feat: add react query support
This commit is contained in:
1 parent
e6f1b80cd3
commit
6c640f1cd4
3 files changed
+93
-12
No files matched your search
@@ -49,7 +49,7 @@ export function Header() {
|
|||||||
<nav className="hidden md:flex items-center gap-8">
|
<nav className="hidden md:flex items-center gap-8">
|
||||||
<Link href="#fitur" className="text-sm font-medium relative group">
|
<Link href="#fitur" className="text-sm font-medium relative group">
|
||||||
<span className="transition-colors hover:text-primary">Fitur</span>
|
<span className="transition-colors hover:text-primary">Fitur</span>
|
||||||
<span className="absolute -bottom-1 left-0 w-0 h-0.5 bg-primary transition-all duration-300 group-hover:w-full"></span>
|
<span className="absolute -bottom-1 left-0 w-0 h-0.5 bg-primary-500 transition-all duration-300 group-hover:w-full"></span>
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
href="#komunitas"
|
href="#komunitas"
|
||||||
@@ -58,7 +58,7 @@ export function Header() {
|
|||||||
<span className="transition-colors hover:text-primary">
|
<span className="transition-colors hover:text-primary">
|
||||||
Komunitas
|
Komunitas
|
||||||
</span>
|
</span>
|
||||||
<span className="absolute -bottom-1 left-0 w-0 h-0.5 bg-primary transition-all duration-300 group-hover:w-full"></span>
|
<span className="absolute -bottom-1 left-0 w-0 h-0.5 bg-primary-500 transition-all duration-300 group-hover:w-full"></span>
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
href="#sumber-belajar"
|
href="#sumber-belajar"
|
||||||
@@ -67,7 +67,7 @@ export function Header() {
|
|||||||
<span className="transition-colors hover:text-primary">
|
<span className="transition-colors hover:text-primary">
|
||||||
Sumber Belajar
|
Sumber Belajar
|
||||||
</span>
|
</span>
|
||||||
<span className="absolute -bottom-1 left-0 w-0 h-0.5 bg-primary transition-all duration-300 group-hover:w-full"></span>
|
<span className="absolute -bottom-1 left-0 w-0 h-0.5 bg-primary-500 transition-all duration-300 group-hover:w-full"></span>
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
href="#testimoni"
|
href="#testimoni"
|
||||||
@@ -76,7 +76,7 @@ export function Header() {
|
|||||||
<span className="transition-colors hover:text-primary">
|
<span className="transition-colors hover:text-primary">
|
||||||
Testimoni
|
Testimoni
|
||||||
</span>
|
</span>
|
||||||
<span className="absolute -bottom-1 left-0 w-0 h-0.5 bg-primary transition-all duration-300 group-hover:w-full"></span>
|
<span className="absolute -bottom-1 left-0 w-0 h-0.5 bg-primary-500 transition-all duration-300 group-hover:w-full"></span>
|
||||||
</Link>
|
</Link>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
export function Logo() {
|
||||||
|
return (
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlnsXlink="http://www.w3.org/1999/xlink"
|
||||||
|
width="317"
|
||||||
|
height="170"
|
||||||
|
viewBox="0 0 317 170"
|
||||||
|
fill="none"
|
||||||
|
>
|
||||||
|
<rect width="317" height="169.613" fill="url(#pattern0_164_317)" />
|
||||||
|
<defs>
|
||||||
|
<pattern
|
||||||
|
id="pattern0_164_317"
|
||||||
|
patternContentUnits="objectBoundingBox"
|
||||||
|
width="1"
|
||||||
|
height="1"
|
||||||
|
>
|
||||||
|
<use
|
||||||
|
xlinkHref="#image0_164_317"
|
||||||
|
transform="scale(0.00184502 0.00344828)"
|
||||||
|
/>
|
||||||
|
</pattern>
|
||||||
|
<image
|
||||||
|
id="image0_164_317"
|
||||||
|
width="542"
|
||||||
|
height="290"
|
||||||
|
preserveAspectRatio="none"
|
||||||
|
xlinkHref="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAh4AAAEiCAYAAAC2k9sBAAAABGdBTUEAALGPC/xhBQAACklpQ0NQc1JHQiBJRUM2MTk2Ni0yLjEAAEiJnVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLine truncated
|
||||||
|
/>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function LogoSimple() {
|
||||||
|
return (
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlnsXlink="http://www.w3.org/1999/xlink"
|
||||||
|
width="138"
|
||||||
|
height="52"
|
||||||
|
viewBox="0 0 138 52"
|
||||||
|
fill="none"
|
||||||
|
>
|
||||||
|
<rect width="137.505" height="51.7538" fill="url(#pattern0_164_316)" />
|
||||||
|
<defs>
|
||||||
|
<pattern
|
||||||
|
id="pattern0_164_316"
|
||||||
|
patternContentUnits="objectBoundingBox"
|
||||||
|
width="1"
|
||||||
|
height="1"
|
||||||
|
>
|
||||||
|
<use
|
||||||
|
xlinkHref="#image0_164_316"
|
||||||
|
transform="matrix(0.000440723 0 0 0.00117096 -0.173204 -1.3185)"
|
||||||
|
/>
|
||||||
|
</pattern>
|
||||||
|
<image
|
||||||
|
id="image0_164_316"
|
||||||
|
width="3000"
|
||||||
|
height="3000"
|
||||||
|
preserveAspectRatio="none"
|
||||||
|
xlinkHref="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAC7gAAAu4CAYAAABxFfV5AAAACXBIWXMAAC4jAAAuIwF4pT92AAX6AElEQVR4nOzaMQEAIAzAsIF/z0MGPRIFFdCzuwMAAAAAAAAAAAAAAL/d3wEAAAAAAAAAAAAAADBjcAcAAAAAAAAAAAAAIMLgDgAAAAAAAAAAAABAgsEdAAAAAAAAAAAAAIAEgzsAAAAAAAAAAAAAAAkGdwAAAAAAAAAAAAAAEgzuAAAAAAAAAAAAAAAkGNwBAAAAAAAAAAAAAEgwuAMAAAAAAAAAAAAAkGBwBwAAAAAAAAAAAAAgweAOAAAAAAAAAAAAAECCwR0AAAAAAAAAAAAAgASDOwAAAAAAAAAAAAAACQZ3AAAAAAAAAAAAAAASDO4AAAAAAAAAAAAAACQY3AEAAAAAAAAAAAAASDC4AwAAAAAAAAAAAACQYHAHLine truncated
|
||||||
|
/>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,18 +1,30 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||||
import type { ThemeProviderProps } from 'next-themes';
|
import type { ThemeProviderProps } from 'next-themes';
|
||||||
import { ThemeProvider as NextThemesProvider } from 'next-themes';
|
import { ThemeProvider as NextThemesProvider } from 'next-themes';
|
||||||
|
import { ReactNode } from 'react';
|
||||||
|
|
||||||
export function Providers({ children }: ThemeProviderProps) {
|
export function Providers({ children }: ThemeProviderProps) {
|
||||||
return (
|
return (
|
||||||
<ThemeProvider
|
<QueryProvider>
|
||||||
attribute="class"
|
<ThemeProvider
|
||||||
defaultTheme="system"
|
attribute="class"
|
||||||
enableSystem
|
defaultTheme="light"
|
||||||
disableTransitionOnChange
|
enableSystem
|
||||||
>
|
disableTransitionOnChange
|
||||||
{children}
|
>
|
||||||
</ThemeProvider>
|
{children}
|
||||||
|
</ThemeProvider>
|
||||||
|
</QueryProvider>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const queryClient = new QueryClient();
|
||||||
|
|
||||||
|
function QueryProvider({ children }: { children: ReactNode }) {
|
||||||
|
return (
|
||||||
|
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user