Fix the ref, upload, keyframes, and implicit-any type errors. [skip build]
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
import { style } from '@vanilla-extract/css';
|
||||
import { keyframes, style } from '@vanilla-extract/css';
|
||||
|
||||
const transitionContainer = style({
|
||||
position: 'relative',
|
||||
@@ -14,36 +14,34 @@ const transitionContent = style({
|
||||
height: '100%',
|
||||
});
|
||||
|
||||
const routeFadeSlideIn = keyframes({
|
||||
from: {
|
||||
opacity: 0,
|
||||
transform: 'translateX(12px)',
|
||||
},
|
||||
to: {
|
||||
opacity: 1,
|
||||
transform: 'translateX(0)',
|
||||
},
|
||||
});
|
||||
|
||||
const animateIn = style({
|
||||
animation: 'routeFadeSlideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1)',
|
||||
'@keyframes': {
|
||||
routeFadeSlideIn: {
|
||||
from: {
|
||||
opacity: 0,
|
||||
transform: 'translateX(12px)',
|
||||
},
|
||||
to: {
|
||||
opacity: 1,
|
||||
transform: 'translateX(0)',
|
||||
},
|
||||
},
|
||||
animation: `${routeFadeSlideIn} 0.25s cubic-bezier(0.4, 0, 0.2, 1)`,
|
||||
});
|
||||
|
||||
const routeFadeSlideOut = keyframes({
|
||||
from: {
|
||||
opacity: 1,
|
||||
transform: 'translateX(0)',
|
||||
},
|
||||
to: {
|
||||
opacity: 0,
|
||||
transform: 'translateX(-12px)',
|
||||
},
|
||||
});
|
||||
|
||||
const animateOut = style({
|
||||
animation: 'routeFadeSlideOut 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards',
|
||||
'@keyframes': {
|
||||
routeFadeSlideOut: {
|
||||
from: {
|
||||
opacity: 1,
|
||||
transform: 'translateX(0)',
|
||||
},
|
||||
to: {
|
||||
opacity: 0,
|
||||
transform: 'translateX(-12px)',
|
||||
},
|
||||
},
|
||||
},
|
||||
animation: `${routeFadeSlideOut} 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards`,
|
||||
});
|
||||
|
||||
interface RouteTransitionProps {
|
||||
|
||||
Reference in New Issue
Block a user