-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improvements and fixes: enable JIT mode in Tailwind, refactor authent…
…ication components, and enhance reports layout
- Loading branch information
1 parent
8ad0646
commit dd307c6
Showing
25 changed files
with
505 additions
and
404 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
src/components/analytics-table/hooks/useAnalyticsOptions.ts
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,32 @@ | ||
import { useMemo } from 'react'; | ||
|
||
export const useAnalyticsOptions = (analyticsType: string) => { | ||
const analyticsOptions = [ | ||
{ value: 'biochemistry-analytics', label: 'BIOCHEMISTRY' }, | ||
{ value: 'hematology-analytics', label: 'HEMATOLOGY' }, | ||
{ value: 'coagulation-analytics', label: 'COAGULATION' }, | ||
]; | ||
|
||
const levelOptions = useMemo(() => { | ||
switch (analyticsType) { | ||
case 'hematology-analytics': | ||
return [ | ||
{ value: '0', label: '-' }, | ||
{ value: '1', label: '1' }, | ||
{ value: '2', label: '2' }, | ||
{ value: '3', label: '3' }, | ||
]; | ||
case 'biochemistry-analytics': | ||
case 'coagulation-analytics': | ||
return [ | ||
{ value: '0', label: '-' }, | ||
{ value: '1', label: '1' }, | ||
{ value: '2', label: '2' }, | ||
]; | ||
default: | ||
return [{ value: '0', label: '-' }]; | ||
} | ||
}, [analyticsType]); | ||
|
||
return { analyticsOptions, levelOptions }; | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import NavBar from '@/components/shared/navigation-bar'; | ||
import Footer from '@/components/shared/ui/footer'; | ||
import { ReactNode } from 'react'; | ||
|
||
interface MainLayoutProps { | ||
children: ReactNode; | ||
title: string; | ||
jsonData: any; | ||
fileName: string; | ||
} | ||
|
||
const MainLayout = ({ children, title, jsonData, fileName }: MainLayoutProps) => { | ||
return ( | ||
<div className='min-h bg-background'> | ||
<div className='min-h flex flex-col content-center items-center justify-center'> | ||
<title>{title}</title> | ||
<NavBar jsonData={jsonData} fileName={fileName} /> | ||
<div className='w-full max-w-7xl'>{children}</div> | ||
<div className='flex flex-col items-center justify-end'> | ||
<Footer /> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default MainLayout; |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import Link from 'next/link'; | ||
|
||
interface AuthLinkProps { | ||
text: string; | ||
linkText: string; | ||
href: string; | ||
} | ||
|
||
const AuthLink = ({ text, linkText, href }: AuthLinkProps) => ( | ||
<p className='text-center text-xs sm:text-sm text-textSecondary'> | ||
{text}{' '} | ||
<Link href={href} className='font-medium text-textPrimary transition-colors duration-200'> | ||
{linkText} | ||
</Link> | ||
</p> | ||
); | ||
|
||
export default AuthLink; |
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,19 @@ | ||
import Logo from '@/components/shared/ui/logo'; | ||
import ThemeToggle from '@/components/shared/ui/theme'; | ||
|
||
export default function Form() { | ||
return ( | ||
<div className='px-2 h-screen from-primary/20 bg-gradient-to-br to-background flex items-center justify-center'> | ||
<div className='w-full max-w-md transform rounded-xl border border-borderColor px-8 py-6 shadow-xl backdrop-blur-sm transition-all duration-300 ease-in-out hover:shadow-2xl sm:px-12 sm:py-8 mx-auto'> | ||
<div className='absolute right-4 top-4 z-50'> | ||
<ThemeToggle /> | ||
</div> | ||
<div className='mb-6 text-center'> | ||
<div className='flex justify-center text-secondary opacity-95 transition-transform duration-300 ease-in-out'> | ||
<Logo className='w-32 sm:w-40 md:w-48 lg:w-56 opacity-90' /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
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
26 changes: 26 additions & 0 deletions
26
src/components/authentication/layout/AuthFormContainer.tsx
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,26 @@ | ||
import Logo from '../../shared/ui/logo'; | ||
import ThemeToggle from '../../shared/ui/theme'; | ||
|
||
interface AuthFormContainerProps { | ||
children: React.ReactNode; | ||
} | ||
|
||
const AuthFormContainer = ({ children }: AuthFormContainerProps) => { | ||
return ( | ||
<div className='px-2 h-screen from-primary/20 bg-gradient-to-br to-background flex items-center justify-center'> | ||
<div className='w-full max-w-md transform rounded-xl border border-borderColor px-8 py-6 shadow-xl backdrop-blur-sm transition-all duration-300 ease-in-out hover:shadow-2xl sm:px-12 sm:py-8 mx-auto'> | ||
<div className='absolute right-4 top-4 z-50'> | ||
<ThemeToggle /> | ||
</div> | ||
<div className='mb-6 text-center'> | ||
<div className='flex justify-center text-secondary opacity-95 transition-transform duration-300 ease-in-out'> | ||
<Logo className='w-32 sm:w-40 md:w-48 lg:w-56 opacity-90' /> | ||
</div> | ||
</div> | ||
{children} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default AuthFormContainer; |
Oops, something went wrong.