Skip to content

Commit

Permalink
Merge pull request #189 from sparcs-kaist/feat/fix-share-routing
Browse files Browse the repository at this point in the history
  • Loading branch information
withSang committed Nov 3, 2023
2 parents cc9db29 + a63ecf5 commit bdeb8bd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { PrivateRoute, PublicRoute } from "hoc/AuthRoutes";
import pToP from "hoc/paramsToProps";

import AppWrapper from "./App.styled";
import Reload from "./components/pages/Reload";

const App = () => (
<AppWrapper>
Expand Down Expand Up @@ -55,6 +56,7 @@ const App = () => (
<PrivateRoute path="/settings" component={SettingsPage} />
<PublicRoute path="/auth" component={AuthPage} />
<Route path="/api" component={ApiPage} />
<Route path="/s" component={Reload} />
<Route path="/" exact component={LandingPage} />
<Route path="/main" exact component={HomePage} />
<Route path="/:name" component={ProfilePage} />
Expand Down
11 changes: 11 additions & 0 deletions src/components/pages/Reload.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React, { useEffect } from "react";

const Reload: React.FC = () => {
useEffect(() => {
location.reload();
}, []);

return <></>;
};

export default Reload;
1 change: 1 addition & 0 deletions src/components/pages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ export const NotFound = loadable(/* webpackPrefetch: true */ () => import("./Not
// export const AdminPage = loadable(/* webpackPrefetch: true */ () => import("./AdminPage"));
export const SearchPage = loadable(/* webpackPrefetch: true */ () => import("./SearchPage"));
export const ApiPage = loadable(/* webpackPrefetch: true */ () => import("./ApiPage"));
export const ReloadPage = loadable(/* webpackPrefetch: true */ () => import("./Reload"));

0 comments on commit bdeb8bd

Please sign in to comment.