Fix controls and frameworks small issues
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -8,7 +8,7 @@ const availableLogos = new Map(
|
||||
export function FrameworkLogo({ name }: { name: string }) {
|
||||
const logo = availableLogos.get(name);
|
||||
return logo ? (
|
||||
<img src={logo} alt="" className="size-12" />
|
||||
<img src={logo} alt="" className="h-12" />
|
||||
) : (
|
||||
<Avatar name={name} size="l" className="size-12" />
|
||||
);
|
||||
|
||||
@@ -83,7 +83,7 @@ export default function FrameworkDetailPage(props: Props) {
|
||||
const controls = framework.controls.edges.map((edge) => edge.node);
|
||||
const selectedControl = controlId
|
||||
? controls.find((control) => control.id === controlId)
|
||||
: controls[0];
|
||||
: controls[0] || null;
|
||||
const connectionId = framework.controls.__id;
|
||||
const deleteFramework = useDeleteFrameworkMutation(
|
||||
framework,
|
||||
@@ -109,7 +109,7 @@ export default function FrameworkDetailPage(props: Props) {
|
||||
});
|
||||
};
|
||||
|
||||
if (!controlId) {
|
||||
if (!controlId && controls.length > 0) {
|
||||
return (
|
||||
<Navigate
|
||||
to={`/organizations/${organizationId}/frameworks/${framework.id}/controls/${controls[0].id}`}
|
||||
|
||||
Reference in New Issue
Block a user