-
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.
Merge branch 'main' into adjust-icons-usage
- Loading branch information
Showing
18 changed files
with
727 additions
and
14 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,7 +1,34 @@ | ||
export default function Home() { | ||
'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, | ||
}) | ||
|
||
return ( | ||
<div className="w-full h-screen flex items-center justify-center text-3xl"> | ||
GOLUB 🚀 | ||
<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.