Skip to content

Commit

Permalink
Fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
LASER-Yi committed Apr 4, 2022
1 parent d87d4e7 commit cb9b23c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
44 changes: 21 additions & 23 deletions src/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,29 +55,27 @@ const App: FunctionComponent = () => {
</Header>
}
>
<Container>
{!editMode && <Visualizer></Visualizer>}
<Modal
opened={editMode}
size="lg"
onClose={() => setEditMode(false)}
centered
withCloseButton={modalCloseable}
closeOnClickOutside={modalCloseable}
closeOnEscape={modalCloseable}
title={
<Title order={3}>
{saveData.soul_mode
? t("editor-soul-mode-title")
: t("editor-title")}
</Title>
}
>
<SaveDataMutationContext.Provider value={setSaveData}>
<Editor onCommit={() => setEditMode(false)}></Editor>
</SaveDataMutationContext.Provider>
</Modal>
</Container>
<Container>{saveData.edited && <Visualizer></Visualizer>}</Container>
<Modal
opened={editMode}
size="lg"
onClose={() => setEditMode(false)}
centered
withCloseButton={modalCloseable}
closeOnClickOutside={modalCloseable}
closeOnEscape={modalCloseable}
title={
<Title order={3}>
{saveData.soul_mode
? t("editor-soul-mode-title")
: t("editor-title")}
</Title>
}
>
<SaveDataMutationContext.Provider value={setSaveData}>
<Editor onCommit={() => setEditMode(false)}></Editor>
</SaveDataMutationContext.Provider>
</Modal>
</AppShell>
</SaveDataContext.Provider>
);
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/time.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const timeUtilities = {
return time.hour * 60 + time.minute;
},
deserialize: (inValue: number): Time => {
const hour = clamp(Math.floor(inValue / 60), 0, 23);
const hour = clamp(Math.floor(inValue / 60), 0, 24);
const minute = inValue % 60;

return { hour, minute, second: 0 };
Expand Down

0 comments on commit cb9b23c

Please sign in to comment.