Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/wodsmith-start/src/components/cohost-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ function CohostSidebarHeader({ competitionName }: { competitionName: string }) {
return (
<SidebarHeader className="border-b px-3 py-3 group-data-[collapsible=icon]:px-2 group-data-[collapsible=icon]:py-3 group-data-[collapsible=icon]:justify-center">
<Link
to="/compete"
to="/"
className="flex items-center gap-2 min-w-0 group-data-[collapsible=icon]:hidden"
>
<img
Expand All @@ -239,7 +239,7 @@ function CohostSidebarHeader({ competitionName }: { competitionName: string }) {
</div>
</Link>
<Link
to="/compete"
to="/"
className="hidden group-data-[collapsible=icon]:block"
>
<img
Expand Down Expand Up @@ -334,7 +334,7 @@ export function CohostSidebar({
<Menu className="h-5 w-5" />
</SidebarTrigger>
<div className="flex items-center gap-2 min-w-0">
<Link to="/compete" className="flex items-center gap-2 shrink-0">
<Link to="/" className="flex items-center gap-2 shrink-0">
<img
src="/wodsmith-logo-no-text.png"
alt="wodsmith compete"
Expand Down
6 changes: 3 additions & 3 deletions apps/wodsmith-start/src/components/compete-mobile-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default function CompeteMobileNav({
<nav className="grid gap-6 font-medium text-lg">
{!shouldHideBrand(pathname) && (
<Link
to="/compete"
to="/"
className="mb-4 flex items-center gap-2 font-semibold text-lg"
onClick={handleLinkClick}
>
Expand Down Expand Up @@ -126,7 +126,7 @@ export default function CompeteMobileNav({
{session?.user ? (
<>
<Link
to="/compete"
to="/"
className="hover:text-primary"
onClick={handleLinkClick}
>
Expand Down Expand Up @@ -200,7 +200,7 @@ export default function CompeteMobileNav({
) : (
<>
<Link
to="/compete"
to="/"
className="hover:text-primary"
onClick={handleLinkClick}
>
Expand Down
2 changes: 1 addition & 1 deletion apps/wodsmith-start/src/components/compete-nav-brand.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Link } from "@tanstack/react-router"

export function CompeteNavBrand() {
return (
<Link to="/compete" className="flex items-center gap-2">
<Link to="/" className="flex items-center gap-2">
Comment thread
coderabbitai[bot] marked this conversation as resolved.
<img
src="/wodsmith-logo-no-text.png"
alt="wodsmith compete"
Expand Down
8 changes: 4 additions & 4 deletions apps/wodsmith-start/src/components/compete-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function CompeteNav({ session, canOrganize }: CompeteNavProps) {
{session?.user ? (
<>
<Link
to="/compete"
to="/"
className="font-bold text-foreground uppercase hover:underline dark:text-dark-foreground"
>
Events
Expand Down Expand Up @@ -55,21 +55,21 @@ export default function CompeteNav({ session, canOrganize }: CompeteNavProps) {
) : (
<div className="flex items-center gap-2">
<Link
to="/compete"
to="/"
className="font-bold text-foreground uppercase hover:underline dark:text-dark-foreground"
>
Events
</Link>
<Link
to="/sign-in"
search={{ redirect: "/compete" }}
search={{ redirect: "/" }}
className="btn-outline"
>
Login
</Link>
<Link
to="/sign-up"
search={{ redirect: "/compete" }}
search={{ redirect: "/" }}
className="btn"
>
Sign Up
Expand Down
6 changes: 3 additions & 3 deletions apps/wodsmith-start/src/components/competition-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ function CompetitionSidebarHeader() {
return (
<SidebarHeader className="h-14 flex-row items-center border-b px-3 group-data-[collapsible=icon]:px-2 group-data-[collapsible=icon]:justify-center">
<Link
to="/compete"
to="/"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
className="flex items-center gap-2 min-w-0 group-data-[collapsible=icon]:hidden"
>
<img
Expand All @@ -226,7 +226,7 @@ function CompetitionSidebarHeader() {
</h1>
</Link>
<Link
to="/compete"
to="/"
className="hidden group-data-[collapsible=icon]:block"
>
<img
Expand Down Expand Up @@ -316,7 +316,7 @@ export function CompetitionSidebar({
<SidebarTrigger className="-ml-1">
<Menu className="h-5 w-5" />
</SidebarTrigger>
<Link to="/compete" className="flex items-center gap-2">
<Link to="/" className="flex items-center gap-2">
<img
src="/wodsmith-logo-no-text.png"
alt="wodsmith compete"
Expand Down
2 changes: 1 addition & 1 deletion apps/wodsmith-start/src/components/landing/final-cta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function FinalCTA({ session }: FinalCTAProps) {
className="border-background/20 text-background hover:bg-background/10 dark:border-border dark:text-foreground dark:hover:bg-secondary"
asChild
>
<Link to="/compete">Browse Competitions</Link>
<Link to="/">Browse Competitions</Link>
</Button>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export function TwoAudiences({ session }: TwoAudiencesProps) {

<div className="mt-auto pt-6 border-t border-border">
<Button variant="outline" className="w-full" asChild>
<Link to="/compete">
<Link to="/">
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Browse Competitions
<ArrowRight className="ml-2 h-4 w-4" />
</Link>
Expand Down
6 changes: 3 additions & 3 deletions apps/wodsmith-start/src/components/nav/main-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function MainNav({
session?.user
? hasWorkoutTracking
? "/workouts"
: "/compete"
: "/"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
: "/"
}
className="flex items-center gap-2"
Expand Down Expand Up @@ -86,7 +86,7 @@ export default function MainNav({
</>
)}
<a
href="/compete"
href="/"
className="font-bold text-foreground uppercase hover:underline dark:text-dark-foreground"
>
Compete
Expand All @@ -112,7 +112,7 @@ export default function MainNav({
) : (
<div className="flex items-center gap-2">
<a
href="/compete"
href="/"
className="font-bold text-foreground uppercase hover:underline dark:text-dark-foreground"
>
Compete
Expand Down
4 changes: 2 additions & 2 deletions apps/wodsmith-start/src/components/nav/mobile-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default function MobileNav({
</>
)}
<a
href="/compete"
href="/"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
className="hover:text-primary"
onClick={handleLinkClick}
>
Expand All @@ -108,7 +108,7 @@ export default function MobileNav({
) : (
<>
<a
href="/compete"
href="/"
className="hover:text-primary"
onClick={handleLinkClick}
>
Expand Down
6 changes: 3 additions & 3 deletions apps/wodsmith-start/src/components/series-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function SeriesSidebarHeader() {
return (
<SidebarHeader className="h-14 flex-row items-center border-b px-3 group-data-[collapsible=icon]:px-2 group-data-[collapsible=icon]:justify-center">
<Link
to="/compete"
to="/"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
className="flex items-center gap-2 min-w-0 group-data-[collapsible=icon]:hidden"
>
<img
Expand All @@ -135,7 +135,7 @@ function SeriesSidebarHeader() {
</h1>
</Link>
<Link
to="/compete"
to="/"
className="hidden group-data-[collapsible=icon]:block"
>
<img
Expand Down Expand Up @@ -293,7 +293,7 @@ export function SeriesSidebar({
<SidebarInset>
<header className="fixed top-0 left-0 right-0 z-40 flex h-14 items-center gap-2 border-b bg-background px-3 md:hidden">
<SidebarTrigger className="-ml-1" />
<Link to="/compete" className="flex items-center gap-2">
<Link to="/" className="flex items-center gap-2">
<img
src="/wodsmith-logo-no-text.png"
alt="wodsmith compete"
Expand Down
2 changes: 2 additions & 0 deletions apps/wodsmith-start/src/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ function RootComponent() {
// Hide MainNav if EITHER current OR target route is compete/admin
// This prevents layout flash during transitions in both directions
const isCompeteRoute =
currentPath === "/" ||
(isNavigating && targetPath === "/") ||
currentPath.startsWith("/compete") ||
(isNavigating && targetPath.startsWith("/compete"))
const isAdminRoute =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const Route = createFileRoute("/_protected/admin/teams/programming/")({
component: AdminProgrammingPage,
beforeLoad: async ({ context }) => {
if (!context.hasWorkoutTracking) {
throw redirect({ to: "/compete" })
throw redirect({ to: "/" })
}
},
loader: async ({ context }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const Route = createFileRoute("/_protected/admin/teams/scaling/")({
component: AdminScalingPage,
beforeLoad: async ({ context }) => {
if (!context.hasWorkoutTracking) {
throw redirect({ to: "/compete" })
throw redirect({ to: "/" })
}
},
loader: async ({ context }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export const Route = createFileRoute("/_protected/calculator/")({
component: BarbellCalculatorPage,
beforeLoad: async ({ context }) => {
if (!context.hasWorkoutTracking) {
throw redirect({ to: "/compete" })
throw redirect({ to: "/" })
}
},
validateSearch: (search: Record<string, unknown>): CalculatorSearch => {
Expand Down
2 changes: 1 addition & 1 deletion apps/wodsmith-start/src/routes/_protected/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const Route = createFileRoute("/_protected/dashboard")({
component: DashboardPage,
beforeLoad: async ({ context }) => {
if (!context.hasWorkoutTracking) {
throw redirect({ to: "/compete" })
throw redirect({ to: "/" })
}
},
loader: async ({ context }) => {
Expand Down
2 changes: 1 addition & 1 deletion apps/wodsmith-start/src/routes/_protected/log/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const Route = createFileRoute("/_protected/log/")({
component: LogPage,
beforeLoad: async ({ context }) => {
if (!context.hasWorkoutTracking) {
throw redirect({ to: "/compete" })
throw redirect({ to: "/" })
}
},
loader: async ({ context }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const Route = createFileRoute("/_protected/movements/")({
component: MovementsPage,
beforeLoad: async ({ context }) => {
if (!context.hasWorkoutTracking) {
throw redirect({ to: "/compete" })
throw redirect({ to: "/" })
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
},
validateSearch: (search: Record<string, unknown>) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const Route = createFileRoute("/_protected/programming/")({
component: PublicProgrammingPage,
beforeLoad: async ({ context }) => {
if (!context.hasWorkoutTracking) {
throw redirect({ to: "/compete" })
throw redirect({ to: "/" })
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
},
loader: async ({ context }): Promise<LoaderData> => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ function CompetitiveHistory({ registrations }: { registrations: any[] }) {
history
</p>
<Button asChild className="mt-4">
<Link to="/compete">Browse Competitions</Link>
<Link to="/">Browse Competitions</Link>
</Button>
</div>
</CardContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const Route = createFileRoute("/_protected/settings/programming/")({
component: ProgrammingTracksPage,
beforeLoad: async ({ context }) => {
if (!context.hasWorkoutTracking) {
throw redirect({ to: "/compete" })
throw redirect({ to: "/" })
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
},
loader: async ({ context }) => {
Expand Down
2 changes: 1 addition & 1 deletion apps/wodsmith-start/src/routes/_protected/team/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const Route = createFileRoute("/_protected/team/")({
component: TeamPage,
beforeLoad: async ({ context }) => {
if (!context.hasWorkoutTracking) {
throw redirect({ to: "/compete" })
throw redirect({ to: "/" })
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const Route = createFileRoute("/_protected/workouts/")({
component: WorkoutsPage,
beforeLoad: async ({ context }) => {
if (!context.hasWorkoutTracking) {
throw redirect({ to: "/compete" })
throw redirect({ to: "/" })
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
},
validateSearch: (search: Record<string, unknown>): WorkoutsSearch => {
Expand Down
1 change: 0 additions & 1 deletion apps/wodsmith-start/src/routes/api/sitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export const Route = createFileRoute("/api/sitemap")({

const staticPages = [
{ url: "/", priority: "1.0", changefreq: "weekly" },
{ url: "/compete", priority: "0.9", changefreq: "daily" },
{ url: "/terms", priority: "0.2", changefreq: "yearly" },
{ url: "/privacy", priority: "0.2", changefreq: "yearly" },
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const Route = createFileRoute("/compete/$slug/register/success")({
const parentMatch = await parentMatchPromise
const competition = parentMatch.loaderData?.competition
if (!competition) {
throw redirect({ to: "/compete" })
throw redirect({ to: "/" })
}

// Check for registration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const Route = createFileRoute("/compete/$slug/registered")({
const competition = parentMatch.loaderData?.competition
const divisions = parentMatch.loaderData?.divisions ?? []
if (!competition) {
throw redirect({ to: "/compete" })
throw redirect({ to: "/" })
}

const [{ registrations }, affiliateResult] = await Promise.all([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function CohostInvitePage() {
This invitation link is invalid or has expired.
</p>
<Button asChild variant="outline">
<Link to="/compete">Browse Competitions</Link>
<Link to="/">Browse Competitions</Link>
</Button>
</CardContent>
</Card>
Expand Down Expand Up @@ -143,7 +143,7 @@ function CohostInvitePage() {
new invite.
</p>
<Button asChild variant="outline">
<Link to="/compete">Browse Competitions</Link>
<Link to="/">Browse Competitions</Link>
</Button>
</CardContent>
</Card>
Expand Down Expand Up @@ -215,7 +215,7 @@ function CohostInvitePage() {
replace: true,
})
} else {
await router.navigate({ to: "/compete", replace: true })
await router.navigate({ to: "/", replace: true })
}
} catch (error) {
toast.dismiss()
Expand Down Expand Up @@ -305,7 +305,7 @@ function CohostInvitePage() {
</Button>

<Button asChild variant="outline" className="w-full">
<Link to="/compete">Browse Competitions</Link>
<Link to="/">Browse Competitions</Link>
</Button>
</CardContent>
</Card>
Expand Down
Loading
Loading