Skip to content

Commit a3fe2cb

Browse files
miyukocwhitequark
authored andcommitted
Show the Amaranth source tab by default if opened via a shared link.
1 parent b96ec85 commit a3fe2cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function AppContent() {
142142
const [shareURL, setShareURL] = useState('');
143143
const [tutorialDone, setTutorialDone] = useState(localStorage.getItem('amaranth-playground.tutorialDone') !== null);
144144
useEffect(() => tutorialDone ? localStorage.setItem('amaranth-playground.tutorialDone', '') : void 0, [tutorialDone]);
145-
const [activeTab, setActiveTab] = useState(tutorialDone ? 'amaranth-source' : 'tutorial');
145+
const [activeTab, setActiveTab] = useState((query || tutorialDone) ? 'amaranth-source' : 'tutorial');
146146
const [amaranthSource, setAmaranthSource] = useState<string>(
147147
query?.s
148148
?? localStorage.getItem('amaranth-playground.source')

0 commit comments

Comments
 (0)