Skip to content

Commit 8f74455

Browse files
committed
chore: Enable slug editing for superusers
1 parent e786092 commit 8f74455

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/create/[id]/createBlueprintSteps/PatternDetails.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const PatternDetails = ({
2727
const githubUserName = useAuthStore((state) => state.username);
2828
const store = useCreateBlueprintStore();
2929
const validationErrors = useCreateBlueprintStore((state) => state.validationErrors);
30-
30+
const { isAdmin } = useAuthStore();
3131
const { setField } = store;
3232

3333
const checkExistingBlueprint = useDebouncedCallback(async (circuitName: string) => {
@@ -70,7 +70,7 @@ const PatternDetails = ({
7070
error={!!validationErrors.title}
7171
errorMessage={validationErrors.title}
7272
/>
73-
<Input title="Slug" disabled value={store.slug} />
73+
<Input title="Slug" disabled={!isAdmin} value={store.slug} onChange={(e) => setField('slug', e.target.value)} />
7474
{/* TODO: Add check for email body max length */}
7575
<DragAndDropFile
7676
accept=".eml"

0 commit comments

Comments
 (0)