Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions frontend/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ import { ApolloProvider } from "@apollo/client/react";
import { UserProvider } from "./context/UserContext";
import { GRAPHQL_URL } from "./graphql/apiUrl";

// HashRouter only adds "#/" when the user navigates, so the start page would
// have the address /project2/ without it. Adding it at once gives every page
// the same kind of address, and anything typed after it goes to the app
// instead of to the server.
if (!window.location.hash) {
window.history.replaceState(null, "", "#/");
}

const client = new ApolloClient({
link: new HttpLink({ uri: GRAPHQL_URL }),
cache: new InMemoryCache({
Expand Down
Loading