-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from nyaomaru/refactor
refactor
- Loading branch information
Showing
16 changed files
with
113 additions
and
122 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { JSX } from "preact"; | ||
import { Link } from "#src/components/Link.tsx"; | ||
|
||
export function PageLayout(props: JSX.HTMLAttributes) { | ||
return ( | ||
<div> | ||
{props.children} | ||
<div class="mt-4"> | ||
<Link text="Back" href="/" color="secondary" /> | ||
</div> | ||
</div> | ||
); | ||
} |
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
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,20 +1,17 @@ | ||
import { defineRoute } from "$fresh/server.ts"; | ||
import Countdown from "#src/islands/Countdown.tsx"; | ||
import { Link } from "#src/components/Link.tsx"; | ||
import { PageLayout } from "#src/components/PageLayout.tsx"; | ||
|
||
export default defineRoute((_req, _ctx) => { | ||
const date = new Date(); | ||
date.setHours(date.getHours() + 1); | ||
return ( | ||
<> | ||
<PageLayout> | ||
<article class="prose lg:prose-xl"> | ||
<p> | ||
The big event is happening <Countdown target={date.toISOString()} />. | ||
</p> | ||
</article> | ||
<div class="mt-4"> | ||
<Link text="Back" href="/" color="secondary" /> | ||
</div> | ||
</> | ||
</PageLayout> | ||
); | ||
}); |
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 |
---|---|---|
@@ -1,16 +1,11 @@ | ||
import { defineRoute } from "$fresh/server.ts"; | ||
import { Link } from "#src/components/Link.tsx"; | ||
import { PageLayout } from "#src/components/PageLayout.tsx"; | ||
import { MapIsland } from "#src/islands/MapIsland.tsx"; | ||
|
||
export default defineRoute((_req, _ctx) => { | ||
return ( | ||
<> | ||
<div> | ||
<MapIsland /> | ||
</div> | ||
<div class="mt-4"> | ||
<Link text="Back" href="/" color="secondary" /> | ||
</div> | ||
</> | ||
<PageLayout> | ||
<MapIsland /> | ||
</PageLayout> | ||
); | ||
}); |
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.