-
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.
Merge pull request #44 from acayseth/develop
Develop
- Loading branch information
Showing
9 changed files
with
52 additions
and
29 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,35 @@ | ||
import 'server-only'; | ||
|
||
import { Product, WithContext } from 'schema-dts' | ||
import type { Metadata } from 'next'; | ||
|
||
import { userHelperHook } from '@/_libs/servers/helper.hook'; | ||
import HomeComponent from '@/components/pages/home/home.component'; | ||
|
||
export function generateMetadata(): Promise<Metadata> { | ||
const { metadata } = userHelperHook(); | ||
|
||
return metadata({ robots: true }); | ||
} | ||
|
||
export default async function () { | ||
const { fetchGiphy } = userHelperHook(); | ||
const giphy = await fetchGiphy({}); | ||
|
||
return <HomeComponent giphy={giphy} />; | ||
|
||
console.log(giphy, 'gp') | ||
|
||
const jsonLd: WithContext<Product> = { | ||
'@context': 'https://schema.org', | ||
'@type': 'Product', | ||
name: 'random gif', | ||
image: giphy?.data?.images?.original_mp4.mp4, | ||
description: 'random gif', | ||
} | ||
|
||
return ( | ||
<> | ||
<HomeComponent giphy={giphy} /> | ||
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}/> | ||
</> | ||
); | ||
} |
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 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