-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: build + lint + progress for liveblocks
- Loading branch information
1 parent
a3214ee
commit d4b7e32
Showing
35 changed files
with
349 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
/* <PageMeta | ||
title={pageTitle} | ||
description={t("bugs-route.meta.description")} | ||
/> */ | ||
} | ||
|
||
import { BugsRoute } from "../../lib/routes/Bugs/BugsRoute"; | ||
import { t } from "../i18n"; | ||
|
||
export async function generateMetadata() { | ||
return { | ||
title: t("bugs-route.title"), | ||
description: t("bugs-route.description"), | ||
}; | ||
} | ||
|
||
export default function BugsPage() { | ||
return <BugsRoute></BugsRoute>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { OracleRoute } from "../../lib/routes/Oracle/OracleRoute"; | ||
import { t } from "../i18n"; | ||
|
||
export async function generateMetadata() { | ||
return { | ||
title: t("oracle-route.play-offline.title"), | ||
description: t("oracle-route.play-offline.description"), | ||
}; | ||
} | ||
|
||
export default function OraclePage() { | ||
return <OracleRoute></OracleRoute>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { PlayOfflineRoute } from "../../lib/routes/Play/PlayOfflineRoute"; | ||
import { t } from "../i18n"; | ||
|
||
export async function generateMetadata() { | ||
return { | ||
title: t("home-route.play-offline.title"), | ||
description: t("home-route.play-offline.description"), | ||
}; | ||
} | ||
|
||
export default function PlayOfflinePage() { | ||
return <PlayOfflineRoute></PlayOfflineRoute>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
"use client"; | ||
import { useParams } from "next/navigation"; | ||
|
||
import { useContext } from "react"; | ||
import { SettingsContext } from "../../../lib/contexts/SettingsContext/SettingsContext"; | ||
import { JoinAGameRoute } from "../../../lib/routes/Play/JoinAGameRoute"; | ||
import { PlayRoute } from "../../../lib/routes/Play/PlayRoute"; | ||
import { RoomProvider } from "../../../lib/services/liveblocks/liveblocks.config"; | ||
|
||
export function Play() { | ||
const params = useParams(); | ||
|
||
const settingsManager = useContext(SettingsContext); | ||
const idFromParams = params.id as string; | ||
const userId = settingsManager.state.userId; | ||
|
||
return ( | ||
<RoomProvider | ||
id={idFromParams || userId} | ||
initialPresence={{ | ||
rollOutput: null, | ||
characterName: null, | ||
color: null, | ||
cursor: null, | ||
message: null, | ||
playerName: null, | ||
}} | ||
> | ||
<PlayRoute></PlayRoute> | ||
</RoomProvider> | ||
); | ||
} | ||
|
||
export function Join() { | ||
const params = useParams(); | ||
|
||
const settingsManager = useContext(SettingsContext); | ||
const idFromParams = params.id as string; | ||
const userId = settingsManager.state.userId; | ||
|
||
return ( | ||
<RoomProvider | ||
id={idFromParams || userId} | ||
initialPresence={{ | ||
rollOutput: null, | ||
characterName: null, | ||
color: null, | ||
cursor: null, | ||
message: null, | ||
playerName: null, | ||
}} | ||
> | ||
<JoinAGameRoute></JoinAGameRoute> | ||
</RoomProvider> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Play } from "../(components)/play"; | ||
import { t } from "../../i18n"; | ||
|
||
export async function generateMetadata() { | ||
return { | ||
title: t("home-route.play-online.title"), | ||
description: t("home-route.play-online.description"), | ||
}; | ||
} | ||
|
||
export default function PlayOnlinePage() { | ||
return <Play></Play>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Join } from "../../(components)/play"; | ||
import { t } from "../../../i18n"; | ||
|
||
export async function generateMetadata() { | ||
return { | ||
title: t("home-route.play-online.title"), | ||
description: t("home-route.play-online.description"), | ||
}; | ||
} | ||
|
||
export default function PlayOnlinePage() { | ||
return <Join></Join>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Play } from "./(components)/play"; | ||
|
||
export default function PlayPage() { | ||
return <Play></Play>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import dynamic from "next/dynamic"; | ||
import React from "react"; | ||
|
||
const NoSSR = (props: { children: React.ReactNode }) => ( | ||
<React.Fragment>{props.children}</React.Fragment> | ||
); | ||
|
||
export default dynamic(() => Promise.resolve(NoSSR), { | ||
ssr: false, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.