mirror of
https://github.com/UiO-Gaming/uiogaming.no.git
synced 2026-11-05 13:56:47 +01:00
fix vulns
This commit is contained in:
1 parent
b0e343a390
commit
08bc43942a
6 files changed
+481
-359
No files matched your search
Generated
+423
-339
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -17,7 +17,7 @@
|
||||
"@sanity/image-url": "^1.1.0",
|
||||
"country-flag-icons": "^1.5.19",
|
||||
"install": "^0.13.0",
|
||||
"next": "^15.5.24",
|
||||
"next": "^16.3.3",
|
||||
"next-intl": "^4.3.4",
|
||||
"react": "19.1.0",
|
||||
"react-dom": "19.1.0",
|
||||
|
||||
@@ -17,18 +17,18 @@ export async function POST(request: NextRequest) {
|
||||
)
|
||||
|
||||
if (_type === "post") {
|
||||
revalidateTag("blog-posts")
|
||||
revalidateTag("blog-posts", "max")
|
||||
if (slug?.current) {
|
||||
revalidateTag(`post-${slug.current}`)
|
||||
revalidateTag(`post-${slug.current}`, "max")
|
||||
}
|
||||
} else if (_type === "event") {
|
||||
revalidateTag("events")
|
||||
revalidateTag("events", "max")
|
||||
if (slug?.current) {
|
||||
revalidateTag(`event-${slug.current}`)
|
||||
revalidateTag(`event-${slug.current}`, "max")
|
||||
}
|
||||
}
|
||||
|
||||
revalidateTag("home")
|
||||
revalidateTag("home", "max")
|
||||
|
||||
return NextResponse.json({
|
||||
revalidated: true,
|
||||
|
||||
@@ -15,6 +15,13 @@
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
.panoramaFallback {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.pcRoomImage {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
"use client"
|
||||
|
||||
import { useEffect, useState } from "react"
|
||||
import { useTranslations } from "next-intl"
|
||||
import Image from "next/image"
|
||||
import { ReactPhotoSphereViewer } from "react-photo-sphere-viewer"
|
||||
@@ -8,6 +9,13 @@ import * as styles from "./office.module.css"
|
||||
|
||||
const Office = () => {
|
||||
const t = useTranslations("office")
|
||||
const [supportsWebGL2, setSupportsWebGL2] = useState<boolean | null>(null)
|
||||
|
||||
useEffect(() => {
|
||||
const canvas = document.createElement("canvas")
|
||||
const gl = canvas.getContext("webgl2")
|
||||
setSupportsWebGL2(Boolean(gl))
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<section id="office">
|
||||
@@ -16,13 +24,23 @@ const Office = () => {
|
||||
<p>{t("text")}</p>
|
||||
<p>{t("tip")}</p>
|
||||
<div className={styles.panoramaContainer}>
|
||||
<ReactPhotoSphereViewer
|
||||
width={"100%"}
|
||||
height={"100%"}
|
||||
src="/3D_office_2025_08_20.jpg"
|
||||
defaultZoomLvl={0}
|
||||
navbar={true}
|
||||
/>
|
||||
{supportsWebGL2 === true ? (
|
||||
<ReactPhotoSphereViewer
|
||||
width={"100%"}
|
||||
height={"100%"}
|
||||
src="/3D_office_2025_08_20.jpg"
|
||||
defaultZoomLvl={0}
|
||||
navbar={true}
|
||||
/>
|
||||
) : (
|
||||
<Image
|
||||
src="/3D_office_2025_08_20.jpg"
|
||||
alt={t("title")}
|
||||
className={styles.panoramaFallback}
|
||||
width={1200}
|
||||
height={900}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<Image
|
||||
src="/pc_room.jpg"
|
||||
|
||||
+20
-7
@@ -1,7 +1,11 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2017",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"lib": [
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"esnext"
|
||||
],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
@@ -11,7 +15,7 @@
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"jsx": "react-jsx",
|
||||
"incremental": true,
|
||||
"plugins": [
|
||||
{
|
||||
@@ -19,9 +23,15 @@
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"@/*": ["./src/*"],
|
||||
"@components/*": ["./src/components/*"],
|
||||
"@lib/*": ["./src/lib/*"]
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@components/*": [
|
||||
"./src/components/*"
|
||||
],
|
||||
"@lib/*": [
|
||||
"./src/lib/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
@@ -29,7 +39,10 @@
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
".next/types/**/*.ts",
|
||||
"global.d.ts"
|
||||
"global.d.ts",
|
||||
".next/dev/types/**/*.ts"
|
||||
],
|
||||
"exclude": ["node_modules"]
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user