mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-26 21:36:40 +07:00
added dynamic routes
This commit is contained in:
parent
8c17c02b3e
commit
0a1d2cbf99
16 changed files with 143 additions and 89 deletions
|
@ -21,7 +21,7 @@ import { useUpdates } from '~/hooks/updates/useUpdates';
|
|||
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
type HeaderProps = {};
|
||||
export interface HeaderProps {}
|
||||
|
||||
const Header: FC<HeaderProps> = observer(() => {
|
||||
const labStats = useGetLabStats();
|
||||
|
|
12
src/containers/main/Header/ssr.tsx
Normal file
12
src/containers/main/Header/ssr.tsx
Normal file
|
@ -0,0 +1,12 @@
|
|||
import dynamic from 'next/dynamic';
|
||||
|
||||
import type { HeaderProps } from '~/containers/main/Header/index';
|
||||
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
export const HeaderSSR = dynamic<HeaderProps>(() => import('./index').then(it => it.Header), {
|
||||
ssr: false,
|
||||
loading: () => <div className={styles.wrap} />,
|
||||
});
|
||||
|
||||
export const HeaderSSRPlaceholder = () => <div className={styles.wrap} />;
|
|
@ -1,5 +1,16 @@
|
|||
@import "../../../styles/variables";
|
||||
|
||||
@keyframes appear {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translate(0, -$header_height);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.wrap {
|
||||
height: $header_height;
|
||||
z-index: 25;
|
||||
|
@ -10,7 +21,8 @@
|
|||
align-items: stretch;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
transition: background-color 0.5s;
|
||||
transition: background-color 0.75s;
|
||||
animation: appear 500ms forwards;
|
||||
|
||||
@include desktop {
|
||||
height: 64px;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue