Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"firebase": "^10.12.2",
"firebase-admin": "^12.1.1",
"js-cookie": "^3.0.5",
"lucide-react": "^0.477.0",
"npm-check-updates": "^16.14.20",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
61 changes: 61 additions & 0 deletions src/components/header/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import React, { useEffect, useState } from 'react';
import { Box, Sheet, Typography } from '@mui/joy';
import { Clock } from 'lucide-react';

const currentLocale = navigator.language;

export default function Header() {
const [currentTime, setCurrentTime] = useState<string>("");

useEffect(() => {
updateTime();

const interval = setInterval(updateTime, 1000);

return () => clearInterval(interval);
}, [])

const updateTime = () => {
const now = new Date();

const formattedTime = now.toLocaleString(currentLocale, {
month: "2-digit",
day: "2-digit",
year: "numeric",
hour: "2-digit",
minute: "2-digit",
second: "2-digit",
hour12: true,
});
setCurrentTime(formattedTime);
};

return (
<Sheet
sx={[
{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexGrow: 1,
p: 2,
borderRadius: { xs: 0, sm: 'sm' },
minWidth: 'min-content',
width: '100%'
},
]}
>
<Box display="flex" justifyContent="space-between" width="100%" gap={1}>
<Box>
<Typography level="h1">Jobify</Typography>
</Box>
<Box display="flex" gap={1} justifyContent="center" alignItems="center">
<Clock />
<Typography level="body-sm">
{currentTime}
</Typography>
</Box>
</Box>
</Sheet>
);
}
3 changes: 3 additions & 0 deletions src/pages/jobify/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
FETCH_DATA_REQUEST,
} from 'src/store/Firebase/constants';
import { CapitalizeFirsLetter } from 'src/helpers/utils';
import Header from 'src/components/header';

export default function TableTextEllipsis() {
const { joblist, companiesList } = useSelector(
Expand Down Expand Up @@ -56,8 +57,10 @@ export default function TableTextEllipsis() {
marginTop: '15px',
marginLeft: '10%',
marginRight: '10%',
gap: 1,
}}
>
<Header/>
<TabsBasic name={companiesList}>
<Box
sx={{
Expand Down
Loading