-
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 #57 from K1nd4SUS/28-use-react-router-layouts
Use react-router layouts to optimize routing
- Loading branch information
Showing
12 changed files
with
156 additions
and
131 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { UseFetchError } from "../hooks/useFetch" | ||
|
||
export type ErrorProps = { | ||
error: UseFetchError | ||
} | ||
|
||
export default function Error({ error }: ErrorProps) { | ||
return ( | ||
<div className="h-full w-full flex flex-col items-center justify-center"> | ||
<span className="font-black text-6xl text-zinc-300">Error {error.status} ({error.statusText})</span> | ||
<p className="font-semibold text-3xl text-zinc-600">{error.data.error}.</p> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Spinner } from "@nextui-org/react" | ||
|
||
export type LoadingProps = { | ||
text?: string | ||
} | ||
|
||
export default function Loading({ text }: LoadingProps) { | ||
return ( | ||
<div className="h-full w-full flex flex-col items-center justify-center"> | ||
<div className="flex flex-col gap-4"> | ||
<span className="font-bold text-xl">{text}</span> | ||
<Spinner/> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Outlet } from "react-router-dom" | ||
import Header from "../components/Header" | ||
import Main from "./Main" | ||
import Page from "./Page" | ||
|
||
export default function ServicesLayout() { | ||
return ( | ||
<Page> | ||
<Header/> | ||
<Main> | ||
<Outlet/> | ||
</Main> | ||
</Page> | ||
) | ||
} | ||
|
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
Oops, something went wrong.