Skip to content

Commit

Permalink
Fix changing URL hash on /new (#19640)
Browse files Browse the repository at this point in the history
* Fix changing URL hash on `/new`

* Properly load search param overwrites

* Reset proj ID
  • Loading branch information
filiptronicek authored Apr 19, 2024
1 parent 287b80a commit 64d431b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/dashboard/src/workspaces/CreateWorkspacePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ export function CreateWorkspacePage() {
const workspaceContext = useWorkspaceContext(contextURL);
const needsGitAuthorization = useNeedsGitAuthorization();

useEffect(() => {
setAutostart(false);
setContextURL(StartWorkspaceOptions.parseContextUrl(location.hash));
setSelectedProjectID(undefined);
setNextLoadOption("searchParams");
}, [location.hash]);

const storeAutoStartOptions = useCallback(async () => {
if (!workspaceContext.data || !user || !currentOrg) {
return;
Expand Down

0 comments on commit 64d431b

Please sign in to comment.