Skip to content

Commit

Permalink
momentを削る
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-20 committed Mar 23, 2024
1 parent 3d9c08c commit 0cc6458
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion workspaces/app/src/lib/date/getDayOfWeekStr.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type moment from 'moment-timezone';

const days = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'] as const;
export const days = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'] as const;

export const getDayOfWeekStr = (date: moment.Moment) => {
const dayOfWeek = date.day();
Expand Down
7 changes: 3 additions & 4 deletions workspaces/app/src/pages/TopPage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import _ from 'lodash';
import moment from 'moment-timezone';
import { Suspense, useId } from 'react';
import React, { Suspense, useId } from 'react';

import { BookCard } from '../../features/book/components/BookCard';
import { FeatureCard } from '../../features/feature/components/FeatureCard';
Expand All @@ -13,12 +12,12 @@ import { Flex } from '../../foundation/components/Flex';
import { Spacer } from '../../foundation/components/Spacer';
import { Text } from '../../foundation/components/Text';
import { Color, Space, Typography } from '../../foundation/styles/variables';
import { getDayOfWeekStr } from '../../lib/date/getDayOfWeekStr';
import { days } from '../../lib/date/getDayOfWeekStr';

import { CoverSection } from './internal/CoverSection';

const TopPage: React.FC = () => {
const todayStr = getDayOfWeekStr(moment());
const todayStr = days[new Date().getDay()]!;
const { data: release } = useRelease({ params: { dayOfWeek: todayStr } });
const { data: featureList } = useFeatureList({ query: {} });
const { data: rankingList } = useRankingList({ query: {} });
Expand Down

0 comments on commit 0cc6458

Please sign in to comment.