Updated deps + minor fix for seperator in content pages

This commit is contained in:
DrMint 2023-03-05 13:22:36 +01:00
parent 7eb7495537
commit e39eb316de
4 changed files with 465 additions and 382 deletions

738
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -28,35 +28,35 @@
"cuid": "^2.1.8", "cuid": "^2.1.8",
"intl-messageformat": "^10.3.1", "intl-messageformat": "^10.3.1",
"isomorphic-dompurify": "^1.0.0", "isomorphic-dompurify": "^1.0.0",
"jotai": "^2.0.2", "jotai": "^2.0.3",
"markdown-to-jsx": "^7.1.9", "markdown-to-jsx": "^7.1.9",
"marked": "^4.2.12", "marked": "^4.2.12",
"material-symbols": "^0.4.5", "material-symbols": "^0.4.6",
"meilisearch": "^0.31.1", "meilisearch": "^0.31.1",
"next": "^13.1.6", "next": "^13.2.3",
"nodemailer": "^6.9.1", "nodemailer": "^6.9.1",
"rc-slider": "^10.1.1", "rc-slider": "^10.1.1",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"react-hotkeys-hook": "^3.4.7", "react-hotkeys-hook": "^3.4.7",
"react-swipeable": "^7.0.0", "react-swipeable": "^7.0.0",
"react-zoom-pan-pinch": "^2.6.1", "react-zoom-pan-pinch": "^3.0.1",
"string-natural-compare": "^3.0.1", "string-natural-compare": "^3.0.1",
"throttle-debounce": "^5.0.0", "throttle-debounce": "^5.0.0",
"tippy.js": "^6.3.7", "tippy.js": "^6.3.7",
"turndown": "^7.1.1", "turndown": "^7.1.1",
"ua-parser-js": "^1.0.33", "ua-parser-js": "^1.0.33",
"usehooks-ts": "^2.9.1", "usehooks-ts": "^2.9.1",
"zod": "^3.20.6" "zod": "^3.21.0"
}, },
"devDependencies": { "devDependencies": {
"@digitak/esrun": "^3.2.19", "@digitak/esrun": "3.2.20",
"@graphql-codegen/cli": "^3.1.0", "@graphql-codegen/cli": "^3.2.1",
"@graphql-codegen/typescript": "3.0.1", "@graphql-codegen/typescript": "3.0.1",
"@graphql-codegen/typescript-graphql-request": "^4.5.8", "@graphql-codegen/typescript-graphql-request": "^4.5.8",
"@graphql-codegen/typescript-operations": "^3.0.1", "@graphql-codegen/typescript-operations": "^3.0.1",
"@types/marked": "^4.0.8", "@types/marked": "^4.0.8",
"@types/node": "18.14.0", "@types/node": "18.14.6",
"@types/nodemailer": "^6.4.7", "@types/nodemailer": "^6.4.7",
"@types/react": "^18.0.28", "@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11", "@types/react-dom": "^18.0.11",
@ -64,17 +64,17 @@
"@types/throttle-debounce": "^5.0.0", "@types/throttle-debounce": "^5.0.0",
"@types/turndown": "^5.0.1", "@types/turndown": "^5.0.1",
"@types/ua-parser-js": "^0.7.36", "@types/ua-parser-js": "^0.7.36",
"@typescript-eslint/eslint-plugin": "^5.53.0", "@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.53.0", "@typescript-eslint/parser": "^5.54.0",
"dotenv": "^16.0.3", "dotenv": "^16.0.3",
"eslint": "^8.34.0", "eslint": "^8.35.0",
"eslint-config-next": "13.1.6", "eslint-config-next": "13.2.3",
"eslint-plugin-import": "^2.27.5", "eslint-plugin-import": "^2.27.5",
"graphql": "^16.6.0", "graphql": "^16.6.0",
"graphql-request": "^5.1.0", "graphql-request": "5.1.0",
"next-sitemap": "^3.1.52", "next-sitemap": "^4.0.2",
"prettier": "^2.8.4", "prettier": "^2.8.4",
"prettier-plugin-tailwindcss": "^0.2.3", "prettier-plugin-tailwindcss": "^0.2.4",
"tailwindcss": "^3.2.7", "tailwindcss": "^3.2.7",
"ts-unused-exports": "^9.0.4", "ts-unused-exports": "^9.0.4",
"typescript": "^4.9.5" "typescript": "^4.9.5"

View File

@ -15,14 +15,14 @@ export const useFullscreen = (
const elem = isClient ? document.querySelector(`#${id}`) : null; const elem = isClient ? document.querySelector(`#${id}`) : null;
const requestFullscreen = useCallback(() => elem?.requestFullscreen(), [elem]); const requestFullscreen = useCallback(async () => elem?.requestFullscreen(), [elem]);
const exitFullscreen = useCallback( const exitFullscreen = useCallback(
async () => isFullscreen && document.exitFullscreen(), async () => isFullscreen && document.exitFullscreen(),
[isFullscreen] [isFullscreen]
); );
const toggleFullscreen = useCallback( const toggleFullscreen = useCallback(
() => (isFullscreen ? exitFullscreen() : requestFullscreen()), async () => (isFullscreen ? exitFullscreen() : requestFullscreen()),
[exitFullscreen, isFullscreen, requestFullscreen] [exitFullscreen, isFullscreen, requestFullscreen]
); );

View File

@ -280,8 +280,8 @@ const Content = ({ content, ...otherProps }: Props): JSX.Element => {
) : undefined ) : undefined
} }
/>, />,
<>
{previousContent?.attributes && ( previousContent?.attributes && (
<div className="mb-6 w-full"> <div className="mb-6 w-full">
<h2 className="mb-4 text-center text-2xl">{format("previous_content")}</h2> <h2 className="mb-4 text-center text-2xl">{format("previous_content")}</h2>
<TranslatedPreviewLine <TranslatedPreviewLine
@ -316,8 +316,7 @@ const Content = ({ content, ...otherProps }: Props): JSX.Element => {
} }
/> />
</div> </div>
)} ),
</>,
selectedTranslation?.text_set?.text && ( selectedTranslation?.text_set?.text && (
<Markdawn text={selectedTranslation.text_set.text} /> <Markdawn text={selectedTranslation.text_set.text} />