-
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 #40 from hubcio2115/fix/organization-names-in-path…
…name Fix organization names in pathname
- Loading branch information
Showing
11 changed files
with
403 additions
and
170 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 |
---|---|---|
@@ -1,3 +1,12 @@ | ||
export default function Dashboard() { | ||
return <div></div>; | ||
import { redirect } from "next/navigation"; | ||
|
||
import { api } from "~/trpc/server"; | ||
|
||
export const dynamic = "force-dynamic"; | ||
|
||
export default async function Dashboard() { | ||
const organizations = await api.organization.getOwnOrganizations.query(); | ||
const orgNames = organizations.map((org) => org.name!); | ||
|
||
redirect(`/dashboard/${orgNames[0]}/overview`); | ||
} |
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,15 @@ | ||
import Link from "next/link"; | ||
|
||
export default function NotFound() { | ||
return ( | ||
<div className="flex min-h-screen flex-col items-center justify-center"> | ||
<h1 className="text-center text-2xl font-bold"> | ||
<span className="text-fuchsia-900">404</span> Not Found :( | ||
</h1> | ||
<p className="text-center">Could not find requested resource</p> | ||
<Link href="/" className="underline"> | ||
Return Home | ||
</Link> | ||
</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
Oops, something went wrong.