generated from taylorbryant/gatsby-starter-tailwind
-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* new full screen map * set initial viewstate from user's geo * migrate to route groups
- Loading branch information
Showing
76 changed files
with
322 additions
and
57 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
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
2 changes: 1 addition & 1 deletion
2
src/app/area/[[...slug]]/loading.tsx → ...pp/(default)/area/[[...slug]]/loading.tsx
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
2 changes: 1 addition & 1 deletion
2
...[[...slug]]/sections/ClimbListSection.tsx → ...[[...slug]]/sections/ClimbListSection.tsx
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
2 changes: 1 addition & 1 deletion
2
.../[[...slug]]/sections/SubAreasSection.tsx → .../[[...slug]]/sections/SubAreasSection.tsx
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
2 changes: 1 addition & 1 deletion
2
src/app/components/AreaPageActions.tsx → .../(default)/components/AreaPageActions.tsx
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
File renamed without changes.
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,21 @@ | ||
import { ArrowRight } from '@phosphor-icons/react/dist/ssr' | ||
|
||
export const LandingHero: React.FC = () => { | ||
return ( | ||
<section className='w-full px-6 py-4'> | ||
<h1 className='text-2xl tracking-tighter font-semibold'>Share your climbing route knowledge!</h1> | ||
<div className='font-medium text-neutral/80'> | ||
Join us to help improve this comprehensive climbing resource for the community. | ||
</div> | ||
<div className='mt-2'> | ||
<HeroAlert /> | ||
</div> | ||
</section> | ||
) | ||
} | ||
|
||
export const HeroAlert: React.FC = () => ( | ||
<div className='mt-2 alert alert-warning'> | ||
<span className='badge badge-sm badge-primary'>NEW</span> | ||
<a href='/maps' className='underline flex items-center gap-1 text-sm'>Crag maps<ArrowRight size={20} /></a> | ||
</div>) |
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
src/app/components/MobileHeader.tsx → ...app/(default)/components/MobileHeader.tsx
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
4 changes: 2 additions & 2 deletions
4
src/app/components/PageFooter.tsx → src/app/(default)/components/PageFooter.tsx
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
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
2 changes: 1 addition & 1 deletion
2
...eneral/components/AreaDescriptionForm.tsx → ...eneral/components/AreaDescriptionForm.tsx
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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ug]/general/components/AreaLatLngForm.tsx → ...ug]/general/components/AreaLatLngForm.tsx
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
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
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
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
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
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
File renamed without changes.
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
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
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
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
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,17 @@ | ||
'use client' | ||
import { SessionProvider } from 'next-auth/react' | ||
import { House } from '@phosphor-icons/react/dist/ssr' | ||
import AuthenticatedProfileNavButton from '@/components/AuthenticatedProfileNavButton' | ||
|
||
export const ProfileMenu: React.FC = () => { | ||
return ( | ||
<SessionProvider> | ||
<div className='absolute right-4 top-4 z-50'> | ||
<nav className='flex items-center gap-2'> | ||
<a className='btn glass' href='/'><House size={18} />Home</a> | ||
<AuthenticatedProfileNavButton isMobile={false} /> | ||
</nav> | ||
</div> | ||
</SessionProvider> | ||
) | ||
} |
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,31 @@ | ||
import 'mapbox-gl/dist/mapbox-gl.css' | ||
import { Metadata } from 'next' | ||
import '@/public/fonts/fonts.css' | ||
import './../global.css' | ||
|
||
/** | ||
* Root layout for `/maps` route | ||
*/ | ||
export default function MapsRootLayout ({ | ||
children | ||
}: { | ||
children: React.ReactNode | ||
}): any { | ||
return ( | ||
<html lang='en'> | ||
<body className='relative'> | ||
{children} | ||
</body> | ||
</html> | ||
) | ||
} | ||
|
||
export const metadata: Metadata = { | ||
title: 'Open climb maps', | ||
description: 'Free rock climbing platform', | ||
openGraph: { | ||
description: 'OpenBeta is a free climbing platform. Join the community and share your knowledge today.', | ||
images: '/south-africa-og.jpeg' | ||
}, | ||
metadataBase: new URL(`https://${process.env.VERCEL_URL ?? 'http://localhost:3000'}`) | ||
} |
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,15 @@ | ||
import { GlobalMap } from '@/components/maps/GlobalMap' | ||
import { ProfileMenu } from '../components/ProfileMenu' | ||
|
||
export const dynamic = 'force-dynamic' | ||
|
||
export default async function MapPage (): Promise<any> { | ||
return ( | ||
<div className='w-full h-full'> | ||
<ProfileMenu /> | ||
<GlobalMap | ||
showFullscreenControl={false} | ||
/> | ||
</div> | ||
) | ||
} |
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,18 @@ | ||
import { NextRequest, NextResponse } from 'next/server' | ||
import { geolocation } from '@vercel/edge' | ||
|
||
export const runtime = 'edge' | ||
|
||
/** | ||
* Return latitude and longitude of the visitor. Only works when deploying on Vercel. | ||
* Endpoint: `/api/geo` | ||
*/ | ||
export async function GET (request: NextRequest): Promise<any> { | ||
const geo = geolocation(request) | ||
const longitude = geo?.longitude | ||
const latitude = geo?.latitude | ||
if (longitude != null && latitude != null) { | ||
return NextResponse.json({ longitude: parseFloat(longitude), latitude: parseFloat(latitude) }, { status: 200 }) | ||
} | ||
return NextResponse.json({ message: 'No geo data available.' }, { status: 503 }) | ||
} |
Oops, something went wrong.
91fea75
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
open-tacos – ./
open-tacos-openbeta-dev.vercel.app
open-tacos-git-develop-openbeta-dev.vercel.app
openclimbmap.com
www.openbeta.io
openbeta.io
tacos.openbeta.io