Skip to content

Commit

Permalink
Merge pull request #972 from shawnrivers/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
shawnrivers authored Sep 24, 2020
2 parents d9fe6c1 + aeeaab3 commit 2eb3436
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
4 changes: 3 additions & 1 deletion src/client/features/Member/template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ export const MemberPage: React.FC<MemberPageProps> = props => {
<InfoItemLabel>
<Translation text="birthday" />
</InfoItemLabel>
<InfoItemValue>{formatDate(birthday)}</InfoItemValue>
<InfoItemValue>
<time dateTime={birthday}>{formatDate(birthday)}</time>
</InfoItemValue>
<InfoItemLabel>
<Translation text="height" />
</InfoItemLabel>
Expand Down
4 changes: 1 addition & 3 deletions src/client/store/app/context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ type Context = {
};

export const Context = React.createContext<Context>({
themeMode: 'auto',
themeKey: 'light',
language: 'ja',
...getInitialState(),
setThemeKey: () => null,
setTheme: () => null,
setLanguage: () => null,
Expand Down
11 changes: 4 additions & 7 deletions src/client/store/app/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@ type State = {
language: Language;
};

export const getInitialState = (
theme?: ThemeMode | null,
language?: Language | null
): State => ({
themeMode: theme ?? 'auto',
themeKey: theme === 'dark' ? 'dark' : 'light',
language: language ?? 'ja',
export const getInitialState = (): State => ({
themeMode: 'auto',
themeKey: 'dark',
language: 'ja',
});

type Action =
Expand Down

0 comments on commit 2eb3436

Please sign in to comment.