Skip to content

Commit 2ce104b

Browse files
committed
fix: SJ access page bugs
1 parent 3304ef4 commit 2ce104b

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

package-lock.json

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"@types/node": "^20.19.35",
3232
"@types/react": "^19.1.5",
3333
"@types/react-dom": "^19.1.5",
34+
"@types/vivus": "^0.4.7",
3435
"eslint": "^9",
3536
"eslint-config-next": "15.4.6",
3637
"shadcn": "^3.8.5",

src/app/access/access-client.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
22
"use client";
33
import { useEffect, useRef } from "react";
4+
import Vivus from "vivus";
45

56
export default function AccessClient() {
67
const isOnce = useRef(false);
@@ -16,8 +17,6 @@ export default function AccessClient() {
1617
map.current.destroy();
1718
map.current = null;
1819
// mapRef.current.innerHTML = "";
19-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
20-
//@ts-ignore
2120
map.current = new Vivus(
2221
"map",
2322
{
@@ -35,8 +34,6 @@ export default function AccessClient() {
3534
useEffect(() => {
3635
if (isOnce.current) return;
3736
isOnce.current = true;
38-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
39-
//@ts-ignore
4037
map.current = new Vivus("map", {
4138
type: "oneByOne",
4239
duration: 200,

src/app/layout.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ export default function RootLayout({
7777
</footer>
7878
</div>
7979
</ThemeProvider>
80-
<script
81-
src="https://cdn.jsdelivr.net/npm/vivus@latest/dist/vivus.min.js"
82-
async
83-
></script>
8480
</body>
8581
</html>
8682
);

0 commit comments

Comments
 (0)