initial commit for new hats app

This commit is contained in:
Ichsan Kurniawan
2025-12-19 13:57:55 +07:00
parent aa949d71ff
commit 7e172f5cf7
314 changed files with 31102 additions and 208 deletions
+41
View File
@@ -0,0 +1,41 @@
'use client'
import { FC, ReactNode } from 'react';
import { ConfigProvider, theme as antdTheme } from "antd";
import { useTheme } from 'next-themes';
import { Plus_Jakarta_Sans } from 'next/font/google'
// import { StyleProvider } from '@ant-design/cssinjs';
const jakarta = Plus_Jakarta_Sans({ subsets: ['latin'] })
type Props = {
children: ReactNode
};
const AntdConfigProvider: FC<Props> = ({ children }) => {
const { systemTheme, theme } = useTheme()
const { defaultAlgorithm, darkAlgorithm } = antdTheme;
return (
<ConfigProvider
theme={{
algorithm: theme === 'dark' ? darkAlgorithm : theme === 'system' && systemTheme === 'dark' ? darkAlgorithm : defaultAlgorithm,
"token": {
"colorPrimary": 'rgb(113 113 122)',
// colorBgContainer: theme === 'dark' ? 'rgb(24, 24, 27)' : theme === 'system' && systemTheme === 'dark' ? 'rgb(24, 24, 27)' : '#ffffff',
colorBgContainer: theme === 'dark' ? 'rgb(9, 9, 11)' : theme === 'system' && systemTheme === 'dark' ? 'rgb(9, 9, 11)' : '#ffffff',
// colorTextPlaceholder: 'rgb(113, 113, 122)',
colorTextPlaceholder: 'rgb(161, 161, 170)',
colorBorder: theme === 'dark' ? 'rgb(39 39 42)' : theme === 'system' && systemTheme === 'dark' ? 'rgb(39 39 42)' : 'rgb(212 212 216)',
borderRadius: 7,
fontFamily: jakarta.style.fontFamily
}
}} componentSize='large'>
{/* <StyleProvider hashPriority="high"> */}
{children}
{/* </StyleProvider> */}
</ConfigProvider>
);
}
export default AntdConfigProvider;
+19
View File
@@ -0,0 +1,19 @@
'use client';
import { ProgressProvider } from '@bprogress/next/app';
const ProgressBarProviders = ({ children }: { children: React.ReactNode }) => {
return (
<>
<ProgressProvider
height="4px"
color="#EA512C"
options={{ showSpinner: true }}
shallowRouting
>
{children}
</ProgressProvider>
</>
);
};
export default ProgressBarProviders;
+23
View File
@@ -0,0 +1,23 @@
'use client'
import { ReactNode } from 'react';
import { type Session } from 'next-auth';
import { SessionProvider as Provider } from 'next-auth/react'
type Props = {
children: ReactNode,
session: Session | null
basePath?: string
};
const SessionProvider: React.FC<Props> = ({ children, session }) => {
return (
<>
<Provider session={session}>
{children}
</Provider>
</>
);
}
export default SessionProvider;
+7
View File
@@ -0,0 +1,7 @@
"use client"
import { ThemeProvider as NextThemesProvider, ThemeProviderProps } from "next-themes"
export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
return <NextThemesProvider {...props}>{children}</NextThemesProvider>
}