-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b717cb4
commit 8714f65
Showing
18 changed files
with
726 additions
and
35 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 @@ | ||
NEXT_PUBLIC_URL_PRODUCT_API=ws://messenger-backend.fly.dev |
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,2 @@ | ||
NEXT_PUBLIC_URL_PRODUCT_API=ws://localhost:8000 | ||
# NEXT_PUBLIC_URL_PRODUCT_API=ws://messenger-backend.fly.dev |
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,4 +1,6 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = {} | ||
const nextConfig = { | ||
reactStrictMode: true, | ||
} | ||
|
||
module.exports = nextConfig |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
Autobuild | ||
autofetch | ||
GOLUB | ||
tailwindcss | ||
tsbuildinfo | ||
|
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,24 +1,24 @@ | ||
import type { Metadata } from 'next' | ||
'use client' | ||
|
||
import { text, title } from '@/app/fonts' | ||
import '@/app/globals.css' | ||
import { Toaster } from '@/components/ui/toaster' | ||
import Providers from '@/store/providers' | ||
import { FC, ReactNode } from 'react' | ||
|
||
export const metadata: Metadata = { | ||
description: 'Generated by create next app', | ||
title: 'Create Next App', | ||
interface PageProps { | ||
children: ReactNode | ||
} | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode | ||
}) { | ||
const Layout: FC<PageProps> = ({ children } = { children: [] }) => { | ||
return ( | ||
<html lang="en" suppressHydrationWarning> | ||
<body className={`${title.variable} ${text.variable}`}> | ||
<Providers>{children}</Providers> | ||
<Toaster /> | ||
</body> | ||
</html> | ||
) | ||
} | ||
|
||
export default Layout |
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,29 +1,34 @@ | ||
import IconChange from '@/components/ui/icons/IconChange' | ||
import Image from 'next/image' | ||
'use client' | ||
|
||
import { Button } from '@/components/ui/button' | ||
import { useToast } from '@/components/ui/use-toast' | ||
import { useApi, useApiContext } from '@/utils' | ||
|
||
const Home = () => { | ||
const api = useApiContext() | ||
const condition = true | ||
const { toast } = useToast() | ||
|
||
const { fetch, response: calculated } = useApi( | ||
() => condition && api.example.add({ a: 1, b: 2 }), | ||
{ | ||
onSuccess: () => | ||
toast({ | ||
title: '🚀 Two numbers added', | ||
}), | ||
} | ||
) | ||
const { response: data } = useApi(() => condition && api.example.data(), { | ||
autofetch: true, | ||
}) | ||
|
||
export default function Home() { | ||
return ( | ||
<div className="flex items-baseline gap-5"> | ||
<div className="flex flex-col items-center"> | ||
This is Image:{' '} | ||
<Image | ||
alt="change" | ||
className="fill-blue-500" | ||
height={24} | ||
src="/icons/change.svg" | ||
width={24} | ||
/> | ||
</div> | ||
<div className="flex flex-col items-center"> | ||
This is an IconChange component:{' '} | ||
<IconChange | ||
className="text-base-gray-1 hover:text-bright-orange transition-colors" | ||
size="lg" | ||
/> | ||
<p>Hover me!</p> | ||
</div> | ||
<div>GOLUB</div> | ||
<div>🚀</div> | ||
<div className="flex items-center justify-center w-screen h-screen gap-20 text-white"> | ||
<div>{data}</div> | ||
<Button onClick={fetch}>Calculate 1 + 2</Button> | ||
{calculated} | ||
</div> | ||
) | ||
} | ||
|
||
export default Home |
Oops, something went wrong.