Skip to content

Commit

Permalink
Merge pull request #141 from simplitrac/remove-achievements-button-fr…
Browse files Browse the repository at this point in the history
…om-homepage

Remove achievements button from homepage
  • Loading branch information
anpaulan authored Sep 9, 2024
2 parents e0a0629 + 7f8f05b commit d6f4344
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 19 deletions.
26 changes: 13 additions & 13 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"mui": "^0.0.1",
"path": "^0.12.7",
"react": "^18.2.0",
"react-achievements": "^1.3.1",
"react-achievements": "^1.3.3",
"react-bootstrap": "^2.10.2",
"react-burger-menu": "^3.0.9",
"react-confetti": "^6.1.0",
Expand Down
8 changes: 7 additions & 1 deletion client/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { AppContext } from './context/AppContext.jsx';
import Chart from "./components/Chart.jsx";
import EditTransactionsPage from './components/EditTransactionsPage';
import UserGuide from './components/UserGuide.jsx';
import {AchievementProvider} from "react-achievements";
import achievementConfig from "./config/achievementConfig.js";


function App() {
Expand All @@ -25,7 +27,11 @@ function App() {
const renderComponent = () => {
switch(screen) {
case "landing":
return <LandingComponent />
return (
<AchievementProvider config={achievementConfig} initialState={{}} badgesButtonPosition={'top-right'}>
<LandingComponent />
</AchievementProvider>
)
case "chart":
return <Chart />
case "camera":
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Camera.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ const Camera = () => {
</div>
<Button className="custom-button" onClick={submitPhoto} style={styles.button}>Submit</Button>
<Button className="custom-button" onClick={activateDesktopCamera} style={styles.button}>Retake</Button>
<BackButton />
</div>
)}
<BackButton />
)}

<canvas ref={canvasRef} style={styles.hiddenCanvas}></canvas>
</div>
Expand Down
4 changes: 2 additions & 2 deletions client/src/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import {AchievementProvider} from "react-achievements";
import achievementConfig from "./config/achievementConfig.js";

ReactDOM.createRoot(document.getElementById('root')).render(
<AchievementProvider config={achievementConfig} initialState={{}} badgesButtonPosition={'top-right'}>
// <AchievementProvider config={achievementConfig} initialState={{}} badgesButtonPosition={'top-right'}>
<AppProvider>
<ChakraProvider theme={theme}>
<App />
</ChakraProvider>
</AppProvider>
</AchievementProvider>
// </AchievementProvider>
);

0 comments on commit d6f4344

Please sign in to comment.