-
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.
Created a new component to handle client side rendering on the main p…
…age to optimize the main page to rendered on the server.
- Loading branch information
Showing
5 changed files
with
87 additions
and
76 deletions.
There are no files selected for viewing
Binary file added
BIN
+259 KB
...ic/images/stock-photo-long-platter-of-tacos-with-a-bowl-of-salsa-2501322241.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+468 KB
...-a-detailed-and-realistic-culinary-delight-on-a-dark-brown-table-2472438793.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,42 @@ | ||
'use client'; | ||
|
||
import React, { useEffect } from 'react'; | ||
import { useRouter } from 'next/navigation'; | ||
import Header from './Header'; | ||
import { handleLocationShare } from '../services/locationService'; | ||
import { handleAddressSubmit } from '../services/geocodeService'; | ||
import { trackVisit } from '../services/analytics'; | ||
import { Location } from '../types'; | ||
|
||
const InteractiveSection: React.FC = () => { | ||
const router = useRouter(); | ||
|
||
useEffect(() => { | ||
trackVisit(); | ||
}, []); | ||
|
||
return ( | ||
<div className="relative flex flex-col items-center rounded-lg border border-gray-300 border-opacity-50 text-center shadow-2xl bg-gray-200 bg-opacity-50 my-10 pt-20 pb-10 px-10"> | ||
<p className="font-thirsty font-bold text-3xl"> | ||
~ Anywhere, Anytime ~ | ||
</p> | ||
|
||
<h1 className="text-6xl font-brothers text-shadow-md py-4 text-neutral-950"> | ||
FIND YOUR NEW FAVORITE <br />TACO SPOT! | ||
</h1> | ||
|
||
<p className="font-bold text-xl pb-5"> | ||
Share or enter your location to get started. | ||
</p> | ||
|
||
<Header | ||
onLocationShare={(loc: Location) => handleLocationShare(loc, router)} | ||
onAddressSubmit={(address: string) => | ||
handleAddressSubmit(address, router) | ||
} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default InteractiveSection; |
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