Skip to content

Commit cbea3f8

Browse files
committed
housekeeping and refactoring
1 parent dc01607 commit cbea3f8

File tree

13 files changed

+71
-214
lines changed

13 files changed

+71
-214
lines changed

resources/css/app.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,34 +75,53 @@
7575
}
7676

7777
@theme inline {
78+
--font-sans:
79+
'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
80+
'Segoe UI Symbol', 'Noto Color Emoji';
81+
82+
--radius-lg: var(--radius);
83+
--radius-md: calc(var(--radius) - 2px);
84+
--radius-sm: calc(var(--radius) - 4px);
85+
7886
--color-background: var(--background);
7987
--color-foreground: var(--foreground);
88+
8089
--color-card: var(--card);
8190
--color-card-foreground: var(--card-foreground);
91+
8292
--color-popover: var(--popover);
8393
--color-popover-foreground: var(--popover-foreground);
94+
8495
--color-primary: var(--primary);
8596
--color-primary-foreground: var(--primary-foreground);
97+
8698
--color-secondary: var(--secondary);
8799
--color-secondary-foreground: var(--secondary-foreground);
100+
88101
--color-muted: var(--muted);
89102
--color-muted-foreground: var(--muted-foreground);
103+
90104
--color-accent: var(--accent);
91105
--color-accent-foreground: var(--accent-foreground);
106+
92107
--color-destructive: var(--destructive);
93108
--color-destructive-foreground: var(--destructive-foreground);
109+
94110
--color-border: var(--border);
95111
--color-input: var(--input);
96112
--color-ring: var(--ring);
113+
97114
--color-chart-1: var(--chart-1);
98115
--color-chart-2: var(--chart-2);
99116
--color-chart-3: var(--chart-3);
100117
--color-chart-4: var(--chart-4);
101118
--color-chart-5: var(--chart-5);
119+
102120
--radius-sm: calc(var(--radius) - 4px);
103121
--radius-md: calc(var(--radius) - 2px);
104122
--radius-lg: var(--radius);
105123
--radius-xl: calc(var(--radius) + 4px);
124+
106125
--color-sidebar: var(--sidebar);
107126
--color-sidebar-foreground: var(--sidebar-foreground);
108127
--color-sidebar-primary: var(--sidebar-primary);
@@ -111,6 +130,7 @@
111130
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
112131
--color-sidebar-border: var(--sidebar-border);
113132
--color-sidebar-ring: var(--sidebar-ring);
133+
114134
--chart-1: rgb(255, 128, 132);
115135
--chart-2: rgb(252, 157, 143);
116136
--chart-3: rgb(255, 189, 102);

resources/js/features/auth/login-form.tsx

Lines changed: 0 additions & 88 deletions
This file was deleted.

resources/js/features/theme/theme-provider.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
/* eslint-disable react-refresh/only-export-components */
22
import { createContext, useContext, useEffect, useState } from 'react'
33

4-
type Theme = 'dark' | 'light' | 'system'
4+
export type Theme = (typeof Themes)[keyof typeof Themes]
5+
6+
export const Themes = {
7+
dark: 'dark',
8+
light: 'light',
9+
system: 'system',
10+
} as const
511

612
type ThemeProviderProps = {
713
children: React.ReactNode

resources/js/hooks/useAuth.ts

Lines changed: 0 additions & 60 deletions
This file was deleted.

resources/js/pages/auth/login.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ interface LoginProps extends PageProps {
2424
canResetPassword: boolean
2525
}
2626

27-
const Login = ({ status, canResetPassword, auth, flash }: LoginProps) => {
27+
const LoginPage = ({ status, canResetPassword, auth, flash }: LoginProps) => {
2828
const { errors } = flash as { errors: ValidationErrors }
2929

3030
const [showPassword, setShowPassword] = useState(false)
@@ -183,4 +183,4 @@ const Login = ({ status, canResetPassword, auth, flash }: LoginProps) => {
183183
)
184184
}
185185

186-
export default Login
186+
export default LoginPage

resources/js/pages/auth/register.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type RegisterForm = {
1717
password_confirmation: string
1818
}
1919

20-
const Register = ({ auth, errors }: PageProps) => {
20+
const RegisterPage = ({ auth, errors }: PageProps) => {
2121
const [showPassword, setShowPassword] = useState(false)
2222

2323
const { data, setData, post, processing, reset } = useForm<Required<RegisterForm>>({
@@ -178,12 +178,8 @@ const Register = ({ auth, errors }: PageProps) => {
178178
</div>
179179
</div>
180180
</form>
181-
182-
{status && (
183-
<div className="mb-4 text-center text-sm font-medium text-green-600">{status}</div>
184-
)}
185181
</AuthLayout>
186182
)
187183
}
188184

189-
export default Register
185+
export default RegisterPage

resources/js/pages/dashboard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ const breadcrumbs: BreadcrumbItem[] = [
1010
},
1111
]
1212

13-
export default function Dashboard() {
13+
export default function DashboardPage() {
1414
return (
1515
<PageLayout breadcrumbs={breadcrumbs} pageTitle="Dashboard">
16-
<div className="flex flex-1 flex-col gap-4 p-4 pt-0">
16+
<div className="flex flex-1 flex-col gap-4 p-4">
1717
<div className="grid auto-rows-min gap-4 md:grid-cols-3">
1818
<div className="aspect-video rounded-xl bg-muted/50" />
1919
<div className="aspect-video rounded-xl bg-muted/50" />

resources/js/pages/errors/not_found.tsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
1+
import { APP_ROUTE } from '@/app/routes'
2+
import { Button } from '@/components/ui/button'
3+
import { Link } from '@inertiajs/react'
4+
import { HomeIcon } from 'lucide-react'
5+
16
export default function NotFound() {
27
return (
38
<>
49
<div className="container">
5-
<div className="title">Page not found</div>
6-
7-
<span>This page does not exist.</span>
10+
<div className="mt-52 flex flex-col items-center">
11+
<h3 className="scroll-m-20 text-2xl font-semibold tracking-tight">404</h3>
12+
<p className="mb-6 leading-7 [&:not(:first-child)]:mt-6">This page doesn't exist</p>
13+
<Button className="h-12 rounded-full" variant="default" asChild>
14+
<Link href={APP_ROUTE} className="flex items-center" replace>
15+
<HomeIcon className="h-4 w-4" />
16+
Go to Home
17+
</Link>
18+
</Button>
19+
</div>
820
</div>
921
</>
1022
)

resources/js/pages/not-found.tsx

Lines changed: 0 additions & 19 deletions
This file was deleted.

resources/js/pages/settings.tsx

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)