Skip to content

Commit ba56b93

Browse files
authored
Merge pull request #11 from RooCodeInc/cte/axe-landing
2 parents 3b0eb65 + 7268e65 commit ba56b93

File tree

24 files changed

+41
-239
lines changed

24 files changed

+41
-239
lines changed

public/placeholder.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

public/placeholder_pfp.png

-62.8 KB
Binary file not shown.

src/app/(authenticated)/analytics/page.tsx renamed to src/app/(authenticated)/dashboard/analytics/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { useTranslations } from 'next-intl';
44

55
import { TitleBar } from '@/components/dashboard/TitleBar';
6-
import { AnalyticsPage } from '@/features/analytics/AnalyticsPage';
6+
import { AnalyticsPage } from '@/components/analytics/AnalyticsPage';
77

88
const AnalyticsPageContainer = () => {
99
const t = useTranslations('Analytics');

src/app/(authenticated)/audit-logs/page.tsx renamed to src/app/(authenticated)/dashboard/audit-logs/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import { useState } from 'react';
55
import { Button } from '@/components/ui/button';
66
import { Drawer } from '@/components/ui/drawer';
77
import { TitleBar } from '@/components/dashboard/TitleBar';
8-
import { AuditLogDetails } from '@/features/dashboard/AuditLogDetails';
9-
import { AuditLogEntry } from '@/features/dashboard/AuditLogEntry';
10-
import type { AuditLog } from '@/features/dashboard/mockAuditLogs';
11-
import { getFilteredLogs } from '@/features/dashboard/mockAuditLogs';
8+
import { AuditLogDetails } from '@/components/dashboard/AuditLogDetails';
9+
import { AuditLogEntry } from '@/components/dashboard/AuditLogEntry';
10+
import type { AuditLog } from '@/components/dashboard/mockAuditLogs';
11+
import { getFilteredLogs } from '@/components/dashboard/mockAuditLogs';
1212

1313
type TimePeriod = '7' | '30' | '90';
1414

src/app/(authenticated)/dashboard/org/[[...organization-profile]]/OrgProfile.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { useTheme } from 'next-themes';
55
import { dark } from '@clerk/themes';
66
import { OrganizationProfile } from '@clerk/nextjs';
77

8-
import DefaultParametersPage from '@/features/dashboard/DefaultParametersPage';
9-
import ProviderWhitelistPage from '@/features/dashboard/ProviderWhitelistPage';
8+
import DefaultParametersPage from '@/components/dashboard/DefaultParametersPage';
9+
import ProviderWhitelistPage from '@/components/dashboard/ProviderWhitelistPage';
1010

1111
export const OrgProfile = () => {
1212
const t = useTranslations('OrganizationProfile');

src/app/(authenticated)/dashboard/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { useTranslations } from 'next-intl';
22

33
import { TitleBar } from '@/components/dashboard/TitleBar';
4-
import { AuditLogCard } from '@/features/dashboard/AuditLogCard';
5-
import { UsageAnalyticsCard } from '@/features/dashboard/UsageAnalyticsCard';
4+
import { AuditLogCard } from '@/components/dashboard/AuditLogCard';
5+
import { UsageAnalyticsCard } from '@/components/dashboard/UsageAnalyticsCard';
66

77
export default function Page() {
88
const t = useTranslations('DashboardIndex');

src/app/layout.tsx

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import '@/styles/globals.css';
22

33
import type { Metadata } from 'next';
44
import { NextIntlClientProvider } from 'next-intl';
5-
import { getLocale } from 'next-intl/server';
5+
import { getLocale, getTranslations, setRequestLocale } from 'next-intl/server';
66
import { ClerkProvider } from '@clerk/nextjs';
77

88
import { getClerkLocale } from '@/lib/locale';
@@ -11,31 +11,39 @@ import { ToastProvider, ToastViewport } from '@/components/ui/toast';
1111
import { ToastProvider as ToastContextProvider } from '@/components/ui/toast-context';
1212
import { Toaster } from '@/components/ui/toaster';
1313

14-
export const metadata: Metadata = {
15-
icons: [
16-
{ rel: 'apple-touch-icon', url: '/apple-touch-icon.png' },
17-
{
18-
rel: 'icon',
19-
type: 'image/png',
20-
sizes: '32x32',
21-
url: '/favicon-32x32.png',
22-
},
23-
{
24-
rel: 'icon',
25-
type: 'image/png',
26-
sizes: '16x16',
27-
url: '/favicon-16x16.png',
28-
},
29-
{ rel: 'icon', url: '/favicon.ico' },
30-
],
31-
};
14+
export async function generateMetadata(): Promise<Metadata> {
15+
const locale = await getLocale();
16+
const t = await getTranslations({ locale, namespace: 'Index' });
17+
18+
return {
19+
title: t('meta_title'),
20+
description: t('meta_description'),
21+
icons: [
22+
{ rel: 'apple-touch-icon', url: '/apple-touch-icon.png' },
23+
{
24+
rel: 'icon',
25+
type: 'image/png',
26+
sizes: '32x32',
27+
url: '/favicon-32x32.png',
28+
},
29+
{
30+
rel: 'icon',
31+
type: 'image/png',
32+
sizes: '16x16',
33+
url: '/favicon-16x16.png',
34+
},
35+
{ rel: 'icon', url: '/favicon.ico' },
36+
],
37+
};
38+
}
3239

3340
export default async function RootLayout({
3441
children,
3542
}: {
3643
children: React.ReactNode;
3744
}) {
3845
const locale = await getLocale();
46+
setRequestLocale(locale);
3947

4048
return (
4149
<html lang={locale} suppressHydrationWarning>

src/app/page.tsx

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,7 @@
11
import { redirect } from 'next/navigation';
22
import { auth as clerkAuth } from '@clerk/nextjs/server';
3-
import { getLocale, getTranslations, setRequestLocale } from 'next-intl/server';
4-
5-
import { Navbar, Footer } from '@/components/layout';
6-
import { Hero, Features } from '@/components/landing';
7-
8-
export async function generateMetadata() {
9-
const locale = await getLocale();
10-
const t = await getTranslations({ locale, namespace: 'Index' });
11-
return { title: t('meta_title'), description: t('meta_description') };
12-
}
133

144
export default async function Page() {
155
const { userId } = await clerkAuth();
16-
17-
if (userId) {
18-
redirect('/dashboard');
19-
}
20-
21-
setRequestLocale(await getLocale());
22-
23-
return (
24-
<>
25-
<Navbar />
26-
<Hero />
27-
<Features />
28-
<Footer />
29-
</>
30-
);
6+
redirect(userId ? '/dashboard' : '/sign-in');
317
}

0 commit comments

Comments
 (0)