fix(client): fix issue with react-query cache

This commit is contained in:
Amruth Pillai 2022-03-14 06:33:14 +01:00
parent fbb0285d0d
commit ed75a85827
No known key found for this signature in database
GPG Key ID: E3C57DF9B80855AD
11 changed files with 350 additions and 300 deletions

View File

@ -1,7 +0,0 @@
.container {
@apply z-10 fixed top-0 left-0 right-0;
strong {
@apply font-semibold;
}
}

View File

@ -1,26 +0,0 @@
import { AnnouncementOutlined } from '@mui/icons-material';
import { Alert, Collapse } from '@mui/material';
import { useState } from 'react';
import { PRODUCT_HUNT_URL } from '@/constants/index';
import styles from './Announcement.module.scss';
const Announcement = () => {
const [open, setOpen] = useState(true);
return (
<div className={styles.container}>
<Collapse in={open}>
<Alert icon={<AnnouncementOutlined />} severity="info" onClose={() => setOpen(false)}>
<a href={PRODUCT_HUNT_URL} target="_blank" rel="noreferrer">
<strong>Reactive Resume is featured on Product Hunt.</strong> If you liked this app, please show your
support by <strong>upvoting</strong>!
</a>
</Alert>
</Collapse>
</div>
);
};
export default Announcement;

View File

@ -10,7 +10,7 @@
"dependencies": {
"@beam-australia/react-env": "^3.1.1",
"@emotion/css": "^11.7.1",
"@emotion/react": "^11.8.1",
"@emotion/react": "^11.8.2",
"@emotion/styled": "^11.8.1",
"@hookform/resolvers": "2.8.8",
"@monaco-editor/react": "^4.3.1",
@ -25,7 +25,7 @@
"joi": "^17.6.0",
"lodash": "^4.17.21",
"md5-hex": "^4.0.0",
"monaco-editor": "^0.32.1",
"monaco-editor": "^0.33.0",
"nanoid": "^3.3.1",
"next": "12.1.0",
"next-i18next": "^10.5.0",
@ -36,7 +36,7 @@
"react-dnd-html5-backend": "^15.1.2",
"react-dom": ">=17",
"react-google-login": "^5.2.2",
"react-hook-form": "^7.27.1",
"react-hook-form": "^7.28.0",
"react-hot-toast": "2.2.0",
"react-hotkeys-hook": "^3.4.4",
"react-icons": "^4.3.1",
@ -59,14 +59,14 @@
"@types/downloadjs": "^1.4.3",
"@types/lodash": "^4.14.179",
"@types/node": "17.0.21",
"@types/react": "17.0.39",
"@types/react": "17.0.40",
"@types/react-beautiful-dnd": "^13.1.2",
"@types/react-redux": "^7.1.23",
"@types/tailwindcss": "^3.0.9",
"@types/uuid": "^8.3.4",
"@types/webfontloader": "^1.6.34",
"autoprefixer": "^10.4.2",
"eslint": "^8.10.0",
"eslint": "^8.11.0",
"eslint-config-next": "12.1.0",
"next-sitemap": "^2.5.7",
"postcss": "^8.4.8",

View File

@ -42,6 +42,7 @@ const Build: NextPage<Props> = ({ username, slug }) => {
`resume/${username}/${slug}`,
() => fetchResumeByIdentifier({ username, slug }),
{
cacheTime: 0,
refetchOnMount: false,
refetchOnReconnect: false,
refetchOnWindowFocus: false,

View File

@ -8,7 +8,6 @@ import { Trans, useTranslation } from 'next-i18next';
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
import Testimony from '@/components/landing/Testimony';
import Announcement from '@/components/shared/Announcement';
import Footer from '@/components/shared/Footer';
import LanguageSwitcher from '@/components/shared/LanguageSwitcher';
import Logo from '@/components/shared/Logo';
@ -45,8 +44,6 @@ const Home: NextPage = () => {
return (
<main className={styles.container}>
<Announcement />
<div className={styles.header}>
<div className={styles.logo}>
<Logo size={256} />

View File

@ -14,7 +14,7 @@ import {
setResumeState,
} from '../resume/resumeSlice';
const DEBOUNCE_WAIT = 2500;
const DEBOUNCE_WAIT = 1000;
const debouncedSync = debounce((resume: Resume) => updateResume(resume), DEBOUNCE_WAIT);

View File

@ -43,7 +43,7 @@ type Separator = ', ' | ' / ' | ' | ';
export const parseListItemPath = (item: ListItem, path: string | string[], separator: Separator = ', '): string => {
if (isArray(path)) {
const value = path.map((_path) => get(item, _path));
const value = path.map((_path) => get(item, _path)).filter((x) => x);
return value.join(separator);
} else {

View File

@ -13,21 +13,21 @@
"typecheck": "tsc"
},
"dependencies": {
"@algolia/client-search": "^4.9.1",
"@algolia/client-search": "^4.12.2",
"@docusaurus/core": "2.0.0-beta.17",
"@docusaurus/preset-classic": "2.0.0-beta.17",
"@docusaurus/theme-classic": "^2.0.0-beta.17",
"@mdx-js/react": "^1.6.22",
"@mdx-js/react": "^2.0.0",
"clsx": "^1.1.1",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1"
"prism-react-renderer": "^1.3.1",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.0-beta.17",
"@docusaurus/types": "^2.0.0-beta.17",
"@tsconfig/docusaurus": "^1.0.4",
"@types/react": ">=16.8.0 <18.0.0",
"@tsconfig/docusaurus": "^1.0.5",
"@types/react": "^17.0.40",
"typescript": "^4.6.2"
},
"browserslist": {

View File

@ -41,7 +41,7 @@
"@typescript-eslint/eslint-plugin": "^5.14.0",
"@typescript-eslint/parser": "^5.14.0",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.10.0",
"eslint": "^8.11.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-prettier": "^4.0.0",

File diff suppressed because it is too large Load Diff

View File

@ -22,7 +22,7 @@
"@nestjs/serve-static": "^2.2.2",
"@nestjs/terminus": "^8.0.4",
"@nestjs/typeorm": "^8.0.3",
"@sendgrid/mail": "^7.6.1",
"@sendgrid/mail": "^7.6.2",
"@types/passport": "^1.0.7",
"bcrypt": "^5.0.1",
"cache-manager": "^3.6.0",
@ -31,7 +31,7 @@
"cookie-parser": "^1.4.6",
"csvtojson": "^2.0.10",
"dayjs": "^1.10.8",
"googleapis": "^95.0.0",
"googleapis": "^96.0.0",
"joi": "^17.6.0",
"lodash": "^4.17.21",
"multer": "^1.4.4",
@ -58,12 +58,12 @@
"@types/express": "^4.17.13",
"@types/multer": "^1.4.7",
"@types/node": "^17.0.21",
"eslint": "^8.10.0",
"eslint": "^8.11.0",
"prettier": "^2.5.1",
"source-map-support": "^0.5.21",
"ts-loader": "^9.2.7",
"ts-loader": "^9.2.8",
"ts-node": "^10.7.0",
"tsconfig-paths": "^3.13.0",
"tsconfig-paths": "^3.14.0",
"typescript": "<4.6.0",
"webpack": "^5.70.0"
}