-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update supabase and supabase js client chore: remove cache files from repo refactor: use grouped routes for layout sharing for all authenticated routes db: squash user migrations into single file db: enable pg_cron and add job for anonymous users cleanup
- Loading branch information
1 parent
a82d40c
commit b6c0e33
Showing
47 changed files
with
592 additions
and
28,675 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export default function Layout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<section className="mx-auto max-w-5xl space-y-6 py-6"> | ||
<header className="space-y-2"> | ||
<h2 className="text-4xl font-semibold tracking-tight lg:text-5xl"> | ||
Bookmarks | ||
</h2> | ||
<p>Add and manage your bookmarks</p> | ||
</header> | ||
<div className="w-full">{children}</div> | ||
</section> | ||
) | ||
} |
File renamed without changes.
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,13 @@ | ||
export default function Layout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<section className="mx-auto max-w-5xl space-y-6 py-6"> | ||
<header className="space-y-2"> | ||
<h2 className="text-4xl font-semibold tracking-tight lg:text-5xl"> | ||
Guest page | ||
</h2> | ||
<p>This is page accessible to guest accounts</p> | ||
</header> | ||
<div className="w-full">{children}</div> | ||
</section> | ||
) | ||
} |
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,20 @@ | ||
import { redirect } from "next/navigation" | ||
|
||
import { GuestForm } from "@/components/user/guest-form" | ||
|
||
import { createClient } from "@/modules/utils/server" | ||
import { isAnonymousUser } from "@/modules/user/helpers" | ||
|
||
export default async function Page() { | ||
const supabase = createClient() | ||
|
||
const { | ||
data: { user }, | ||
} = await supabase.auth.getUser() | ||
|
||
if (!user || !isAnonymousUser(user)) { | ||
redirect("/login") | ||
} | ||
|
||
return <GuestForm isAnonymousUser={user.is_anonymous ?? false} /> | ||
} |
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,25 @@ | ||
import { ApplicationLayout } from "@/components/application-layout" | ||
|
||
import { createClient } from "@/modules/utils/server" | ||
import { isAnonymousUser } from "@/modules/user/helpers" | ||
|
||
export default async function Layout({ | ||
children, | ||
}: { | ||
children: React.ReactNode | ||
}) { | ||
const supabase = createClient() | ||
|
||
const { | ||
data: { user }, | ||
} = await supabase.auth.getUser() | ||
|
||
return ( | ||
<ApplicationLayout | ||
userId={user?.id} | ||
isAnonymousUser={!!user && isAnonymousUser(user)} | ||
> | ||
{children} | ||
</ApplicationLayout> | ||
) | ||
} |
File renamed without changes.
File renamed without changes.
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,35 @@ | ||
import { DynamicNavigationLinks } from "@/components/dynamic-navigation-links" | ||
|
||
export default function Layout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<section className="mx-auto max-w-5xl space-y-6 py-6"> | ||
<header className="space-y-2"> | ||
<h2 className="text-4xl font-semibold tracking-tight lg:text-5xl"> | ||
Settings | ||
</h2> | ||
<p>Manage your accounts, profile and credentials settings</p> | ||
</header> | ||
<div className="flex flex-col gap-6 lg:flex-row"> | ||
<nav className="-ml-4 h-full min-w-[30%]"> | ||
<DynamicNavigationLinks | ||
items={[ | ||
{ | ||
href: "/settings/accounts", | ||
label: "Accounts", | ||
}, | ||
{ | ||
href: "/settings/profile", | ||
label: "Profile", | ||
}, | ||
{ | ||
href: "/settings/credentials", | ||
label: "Credentials", | ||
}, | ||
]} | ||
/> | ||
</nav> | ||
<div className="w-full">{children}</div> | ||
</div> | ||
</section> | ||
) | ||
} |
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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.