Skip to content

Commit

Permalink
Fix routing problems, file cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
brunopc-net committed Aug 14, 2024
1 parent c4bbced commit 7272b94
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 36 deletions.
Binary file removed public/favicon.ico
Binary file not shown.
Binary file removed public/logo192.png
Binary file not shown.
Binary file removed public/logo512.png
Binary file not shown.
25 changes: 0 additions & 25 deletions public/manifest.json

This file was deleted.

16 changes: 6 additions & 10 deletions src/Reactsume.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,12 @@ const Reactsume = ({data, theme}) => {
}, []);

return redirectedLang && (
<Router>
<Routes>
<Route>
<Route path="/" element={<Navigate to={`/${redirectedLang}`} replace />} />
{Object.keys(data.basics.label).map( lang =>
<Route key={lang} path={`/${lang}`} element={<Resume data={data} theme={theme} lang={lang} />} />
)}
</Route>
</Routes>
</Router>
<Routes>
<Route path="/" element={<Navigate to={`/${redirectedLang}`} replace />} />
{Object.keys(data.basics.label).map( lang =>
<Route key={lang} path={`/${lang}`} element={<Resume data={data} theme={theme} lang={lang} />} />
)}
</Routes>
);
};

Expand Down
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useEffect, useState } from 'react';
import ReactDOM from 'react-dom/client';
import { HashRouter } from "react-router-dom";

import Reactsume from './Reactsume';
// Reactsume need 2 things: the resume data and a theme
Expand Down Expand Up @@ -40,6 +41,8 @@ ReactDOM.createRoot(
document.getElementById('root'),
).render(
<React.StrictMode>
<App />
<HashRouter>
<App />
</HashRouter>
</React.StrictMode>
);

0 comments on commit 7272b94

Please sign in to comment.