Skip to content
Closed
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
8 changes: 4 additions & 4 deletions src/app-hooks/proTabsContext/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const defaultValue = {
setActiveKey: () => {},
panes: [],
setPanes: () => {},
removeTab: () => {},
removeTab: () => {}
}

const initialPanes = [
Expand All @@ -18,8 +18,8 @@ const initialPanes = [
key: '/',
content: <Home />,
closable: false,
path: '/',
},
path: '/'
}
]

const ProTabContext = createContext(defaultValue)
Expand Down Expand Up @@ -61,7 +61,7 @@ const ProTabProvider = ({ children }) => {
setActiveKey,
panes,
setPanes,
removeTab,
removeTab
}),
[activeKey, setActiveKey, panes, setPanes, removeTab]
)
Expand Down
40 changes: 21 additions & 19 deletions src/components/stateless/BackgroundBoxes/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const COLORS = [
'rgb(216 180 254)',
'rgb(147 197 253)',
'rgb(165 180 252)',
'rgb(196 181 253)',
'rgb(196 181 253)'
]

export const BoxesCore = ({ className, ...rest }) => {
Expand All @@ -38,7 +38,7 @@ export const BoxesCore = ({ className, ...rest }) => {
return (
<div
style={{
transform: `translate(-40%,-60%) skewX(-48deg) skewY(14deg) scale(0.675) rotate(0deg) translateZ(0)`,
transform: 'translate(-40%,-60%) skewX(-48deg) skewY(14deg) scale(0.675) rotate(0deg) translateZ(0)'
}}
className={clsx(
'absolute -top-1/4 left-1/4 z-0 flex h-full w-full -translate-x-1/2 -translate-y-1/2 p-4',
Expand All @@ -47,31 +47,33 @@ export const BoxesCore = ({ className, ...rest }) => {
{...rest}
>
{Array.from({ length: rowsCount }).map((_, i) => (
<motion.div key={`row` + i} className="relative h-8 w-16 border-l border-slate-700">
<motion.div key={'row' + i} className='relative h-8 w-16 border-l border-slate-700'>
{Array.from({ length: colsCount }).map((_, j) => (
<motion.div
whileHover={{
backgroundColor: randomColors?.[i]?.[j] || COLORS[(i + j) % COLORS.length] || 'transparent',
transition: { duration: 0 },
transition: { duration: 0 }
}}
animate={{
transition: { duration: 1 },
transition: { duration: 1 }
}}
key={`col` + j}
className="relative h-8 w-16 border-t border-r border-slate-700"
key={'col' + j}
className='relative h-8 w-16 border-t border-r border-slate-700'
>
{j % 2 === 0 && i % 2 === 0 ? (
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth="1.5"
stroke="currentColor"
className="pointer-events-none absolute -top-[14px] -left-[22px] h-6 w-10 stroke-[1px] text-slate-700"
>
<path strokeLinecap="round" strokeLinejoin="round" d="M12 6v12m6-6H6" />
</svg>
) : null}
{j % 2 === 0 && i % 2 === 0
? (
<svg
xmlns='http://www.w3.org/2000/svg'
fill='none'
viewBox='0 0 24 24'
strokeWidth='1.5'
stroke='currentColor'
className='pointer-events-none absolute -top-[14px] -left-[22px] h-6 w-10 stroke-[1px] text-slate-700'
>
<path strokeLinecap='round' strokeLinejoin='round' d='M12 6v12m6-6H6' />
</svg>
)
: null}
</motion.div>
))}
</motion.div>
Expand Down
Loading