Skip to content

Commit

Permalink
enhance(frontend): イベントリストにMansoryレイアウトを導入
Browse files Browse the repository at this point in the history
  • Loading branch information
EbiseLutica committed Mar 25, 2024
1 parent bb836fa commit f0f019c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"react-bootstrap": "^2.8.0",
"react-datepicker": "^4.23.0",
"react-dom": "^18.2.0",
"react-masonry-css": "^1.0.16",
"react-query": "^3.39.3",
"react-router": "^6.15.0",
"react-router-dom": "^6.15.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.card {
max-width: 480px;
&.official {
border-left: 5px solid var(--bs-primary);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useAtomValue } from 'jotai';
import { Stack } from 'react-bootstrap';
import Masonry from 'react-masonry-css';

import { EventCardView } from '@/components/domains/events/EventCardView';
import { allEventsAtom } from '@/states/events';
Expand All @@ -8,10 +8,14 @@ export const EventListView: React.FC = () => {
const allEvents = useAtomValue(allEventsAtom);

return (
<Stack gap={2}>
<Masonry breakpointCols={{
default: 3,
992: 2,
768: 1,
}} className="d-flex gap-3" columnClassName="d-flex flex-column gap-3">
{allEvents.map((event) => (
<EventCardView event={event} key={event.id} />
<EventCardView key={event.id} event={event} />
))}
</Stack>
</Masonry>
);
};
11 changes: 11 additions & 0 deletions pnpm-lock.yaml

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

0 comments on commit f0f019c

Please sign in to comment.