File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ export const client = new Client({
2323 async refreshAuth ( ) {
2424 if ( isAuthenticated ( ) ) {
2525 logout ( ) ;
26+ window . location . reload ( ) ;
2627 }
2728 } ,
2829 } ;
Original file line number Diff line number Diff line change @@ -3,15 +3,15 @@ import { useRef } from "react";
33import { fetchProfile , isAuthenticated } from "../api/auth" ;
44import { EditorAppShell } from "../components/appshell" ;
55import { createParametersStore , ParametersContext } from "../stores/parameters" ;
6- import "../styles/editor.css" ;
76import { getInitialInputsFromUrl } from "../share/urlShare" ;
87import { preloadDefaultFonts } from "../stores/fonts" ;
98import "../styles/editor.css" ;
109import "../styles/page.css" ;
1110
1211export const Route = createFileRoute ( "/" ) ( {
1312 component : Editor ,
14- beforeLoad : ( { location } ) => {
13+ beforeLoad : async ( { location } ) => {
14+ await fetchProfile ( ) ;
1515 if ( ! isAuthenticated ( ) ) {
1616 throw redirect ( {
1717 to : "/login" ,
@@ -33,7 +33,7 @@ export function Editor() {
3333 const profile = Route . useLoaderData ( ) ;
3434 const initialFromUrl = getInitialInputsFromUrl ( window . location . href ) ;
3535 const store = useRef (
36- createParametersStore ( { name : profile ?. login ?? "" , ...initialFromUrl } ) ,
36+ createParametersStore ( { name : profile ?. login , ...initialFromUrl } ) ,
3737 ) . current ;
3838
3939 return (
You can’t perform that action at this time.
0 commit comments