Skip to content

Commit

Permalink
refactor: FRON-40 reformat project structure and organization (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lombardoc4 authored Mar 16, 2024
1 parent 275226e commit eac7597
Show file tree
Hide file tree
Showing 48 changed files with 149 additions and 645 deletions.
10 changes: 0 additions & 10 deletions src/app/(features)/EventCountdown.tsx

This file was deleted.

76 changes: 0 additions & 76 deletions src/app/(features)/RaceTimeline.tsx

This file was deleted.

68 changes: 0 additions & 68 deletions src/app/(features)/StandingsTimeline.tsx

This file was deleted.

10 changes: 0 additions & 10 deletions src/app/[season]/[round]/[driver]/[session]/page.tsx

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions src/app/[season]/[round]/[driver]/page.tsx

This file was deleted.

54 changes: 0 additions & 54 deletions src/app/[season]/[round]/page.tsx

This file was deleted.

26 changes: 0 additions & 26 deletions src/app/[season]/layout.tsx

This file was deleted.

58 changes: 0 additions & 58 deletions src/app/[season]/page.tsx

This file was deleted.

Empty file added src/app/api/driver/router.ts
Empty file.
Empty file added src/app/api/event/router.ts
Empty file.
12 changes: 12 additions & 0 deletions src/app/api/middleware.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { NextRequest } from 'next/server';

export function middleware(request: NextRequest) {
// Clone the request headers and set a new header `Auther`
const requestHeaders = new Headers(request.headers);
requestHeaders.set('Authorization', 'Bearer my-secret-token');
}

// See "Matching Paths" below to learn more
export const config = {
matcher: '/dashboard/:path*',
};
Empty file added src/app/api/season/router.ts
Empty file.
Empty file added src/app/api/session/router.ts
Empty file.
19 changes: 19 additions & 0 deletions src/app/dashboard/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { DropdownGroup } from '../../components/QueryNav';

export default function DashboardLayout({
children, // will be a page or nested layout
}: {
children: React.ReactNode;
}) {
return (
<>
<DropdownGroup />

<div className='container grid grid-cols-4'>
{/* <SideBar></SideBar> */}
<aside>SideBar Component Goes Here</aside>
<main className='col-span-3 min-h-96'>{children}</main>
</div>
</>
);
}
5 changes: 5 additions & 0 deletions src/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// {serverError ? <Error statusCode={422} title={serverError} /> : children}

export default function Page() {
return <h1>Hello, Dashboard Page!</h1>;
}
10 changes: 6 additions & 4 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ import { Inter } from 'next/font/google';

import './globals.css';

import { Nav } from './ui/Nav';
import { fetchAPI } from '../utils/helpers';
import { Footer } from '@/components/Footer';
import { TopNav } from '@/components/TopNav';

import { fetchAPI } from '../lib/helpers';

const inter = Inter({ subsets: ['latin'] });

Expand All @@ -27,13 +29,13 @@ export default async function RootLayout({
<body
className={clsx('min-h-screen', inter.className, {
server: server,
// noServer: !server,
})}
>
<Provider>
<Nav />
<TopNav />
{children}
</Provider>
<Footer />
</body>
</html>
);
Expand Down
Loading

0 comments on commit eac7597

Please sign in to comment.