mirror of
https://github.com/Vikeo/LifeTrinket.git
synced 2025-11-18 16:58:01 +00:00
add button to go back to start if render fails
This commit is contained in:
12
src/App.tsx
12
src/App.tsx
@@ -26,6 +26,8 @@ const StartWrapper = styled.div`
|
||||
`;
|
||||
|
||||
const PlayWrapper = styled.div`
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
max-width: fit-content;
|
||||
max-height: fit-content;
|
||||
@media (orientation: portrait) {
|
||||
@@ -39,6 +41,13 @@ const removeLocalStorage = async () => {
|
||||
localStorage.removeItem('playing');
|
||||
};
|
||||
|
||||
const EmergencyResetButton = styled.button`
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: -1;
|
||||
`;
|
||||
|
||||
const App = () => {
|
||||
const analytics = useAnalytics();
|
||||
const savedPlayers = localStorage.getItem('players');
|
||||
@@ -105,6 +114,9 @@ const App = () => {
|
||||
goToStart={goToStart}
|
||||
wakeLock={wakeLock}
|
||||
/>
|
||||
<EmergencyResetButton onClick={goToStart}>
|
||||
Go To Start
|
||||
</EmergencyResetButton>
|
||||
</PlayWrapper>
|
||||
) : (
|
||||
<StartWrapper>
|
||||
|
||||
Reference in New Issue
Block a user