Skip to content

Commit

Permalink
wrap chips
Browse files Browse the repository at this point in the history
  • Loading branch information
EwanLyon committed May 24, 2024
1 parent 01ebcb5 commit 21ad836
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions apps/nextjs/pages/[event]/schedule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ const SETTINGS = {
liveRunId: "",
};

const WrappableChip = styled(Chip)(({theme}) => ({
padding: theme.spacing(1), height: '100%', display: 'flex', flexDirection: 'row',
'& .MuiChip-label': { overflowWrap: 'break-word', whiteSpace: 'normal', textOverflow: 'clip' }
}))

type Run = QUERY_EVENT_RESULTS["event"]["runs"][number] & { order: number };

type EventScheduleProps = {
Expand Down Expand Up @@ -219,7 +224,7 @@ export default function EventSchedule({ event }: EventScheduleProps) {
const consoleFilterElements = [...new Set(event.runs.map((item) => item.platform))].sort().map((console) => {
if (console === "?") return <></>;
return (
<Chip
<WrappableChip
key={console}
color={settings.filter.console.includes(console.toLowerCase()) ? "primary" : "default"}
label={console}
Expand Down Expand Up @@ -854,7 +859,8 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => {
url:
process.env.NODE_ENV === "production"
? "https://keystone.ausspeedruns.com/api/graphql"
: "http://localhost:8000/api/graphql",
: "https://keystone.ausspeedruns.com/api/graphql",
// : "http://localhost:8000/api/graphql",
exchanges: [cacheExchange, ssrCache, fetchExchange],
},
false,
Expand Down

0 comments on commit 21ad836

Please sign in to comment.