mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 02:33:01 +00:00
Organisations and new Account page
This commit is contained in:
@@ -1,13 +1,15 @@
|
|||||||
import LogOutButton from "@/components/log-out-button";
|
import { Link } from "react-router-dom";
|
||||||
|
|
||||||
function Account() {
|
function Account() {
|
||||||
return (
|
return (
|
||||||
<main className="w-full h-[100vh] flex flex-col items-center justify-center gap-4 p-4">
|
<main className="w-full h-[100vh] flex flex-col items-start gap-4 p-4">
|
||||||
<h1 className="text-3xl font-bold">Account</h1>
|
<h1 className="text-3xl font-600">Account</h1>
|
||||||
|
|
||||||
<p className="text-muted-foreground">Account page here</p>
|
<p className="text-muted-foreground">Account page here</p>
|
||||||
|
|
||||||
<LogOutButton />
|
<Link to="/" className="">
|
||||||
|
Go to Home
|
||||||
|
</Link>
|
||||||
</main>
|
</main>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import { BrowserRouter, Route, Routes } from "react-router-dom";
|
import { BrowserRouter, Route, Routes } from "react-router-dom";
|
||||||
|
import Account from "@/Account";
|
||||||
import { Auth } from "@/components/auth-provider";
|
import { Auth } from "@/components/auth-provider";
|
||||||
|
import NotFound from "@/components/NotFound";
|
||||||
import { ThemeProvider } from "@/components/theme-provider";
|
import { ThemeProvider } from "@/components/theme-provider";
|
||||||
import Index from "@/Index";
|
import Index from "@/Index";
|
||||||
import Account from "@/Account";
|
import Organisations from "@/Organisations";
|
||||||
import Test from "@/Test";
|
import Test from "@/Test";
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
@@ -12,8 +14,10 @@ function App() {
|
|||||||
<BrowserRouter>
|
<BrowserRouter>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path="/" element={<Index />} />
|
<Route path="/" element={<Index />} />
|
||||||
<Route path="/account" element={<Account />} />
|
<Route path="/settings/account" element={<Account />} />
|
||||||
|
<Route path="/settings/organisations" element={<Organisations />} />
|
||||||
<Route path="/test" element={<Test />} />
|
<Route path="/test" element={<Test />} />
|
||||||
|
<Route path={"*"} element={<NotFound />} />
|
||||||
</Routes>
|
</Routes>
|
||||||
</BrowserRouter>
|
</BrowserRouter>
|
||||||
</Auth>
|
</Auth>
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import {
|
|||||||
DropdownMenu,
|
DropdownMenu,
|
||||||
DropdownMenuContent,
|
DropdownMenuContent,
|
||||||
DropdownMenuItem,
|
DropdownMenuItem,
|
||||||
|
DropdownMenuLabel,
|
||||||
|
DropdownMenuSeparator,
|
||||||
DropdownMenuTrigger,
|
DropdownMenuTrigger,
|
||||||
} from "@/components/ui/dropdown-menu";
|
} from "@/components/ui/dropdown-menu";
|
||||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
|
||||||
@@ -185,9 +187,16 @@ function Index() {
|
|||||||
<SmallUserDisplay user={user} />
|
<SmallUserDisplay user={user} />
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
<DropdownMenuContent align={"end"}>
|
<DropdownMenuContent align={"end"}>
|
||||||
|
<DropdownMenuLabel className="text-end">Settings</DropdownMenuLabel>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
<DropdownMenuItem asChild className="flex items-end justify-end">
|
<DropdownMenuItem asChild className="flex items-end justify-end">
|
||||||
<Link to="/account" className="p-0 text-end">
|
<Link to="/settings/account" className="p-0 text-end">
|
||||||
Settings
|
My Account
|
||||||
|
</Link>
|
||||||
|
</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem asChild className="flex items-end justify-end">
|
||||||
|
<Link to="/settings/organisations" className="p-0 text-end">
|
||||||
|
My Organisations
|
||||||
</Link>
|
</Link>
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
|
|||||||
17
packages/frontend/src/Organisations.tsx
Normal file
17
packages/frontend/src/Organisations.tsx
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import { Link } from "react-router-dom";
|
||||||
|
|
||||||
|
function Organisations() {
|
||||||
|
return (
|
||||||
|
<main className="w-full h-[100vh] flex flex-col items-start gap-4 p-4">
|
||||||
|
<h1 className="text-3xl font-600">Organisations</h1>
|
||||||
|
|
||||||
|
<p className="text-muted-foreground">Organisations page here</p>
|
||||||
|
|
||||||
|
<Link to="/" className="">
|
||||||
|
Go to Home
|
||||||
|
</Link>
|
||||||
|
</main>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Organisations;
|
||||||
Reference in New Issue
Block a user