mirror of
https://github.com/traberph/short.git
synced 2026-11-22 22:55:12 +00:00
add functionality to pin page && refactoring
This commit is contained in:
Generated
+80
-82
@@ -8,9 +8,10 @@
|
||||
"name": "short",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"@heroicons/react": "^2.1.5",
|
||||
"@prisma/client": "^5.18.0",
|
||||
"js-sha256": "^0.11.0",
|
||||
"next": "^15.0.0-canary.135",
|
||||
"next": "^15.0.0-canary.195",
|
||||
"ua-parser-js": "^1.0.38",
|
||||
"zod": "^3.23.8"
|
||||
},
|
||||
@@ -109,6 +110,15 @@
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@heroicons/react": {
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@heroicons/react/-/react-2.1.5.tgz",
|
||||
"integrity": "sha512-FuzFN+BsHa+7OxbvAERtgBTNeZpUjgM/MIizfVkSCL2/edriN0Hx/DWRCR//aPYwO5QX/YlgLGXk+E3PcfZwjA==",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"react": ">= 16"
|
||||
}
|
||||
},
|
||||
"node_modules/@humanwhocodes/config-array": {
|
||||
"version": "0.11.14",
|
||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz",
|
||||
@@ -609,9 +619,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/env": {
|
||||
"version": "15.0.0-canary.135",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-15.0.0-canary.135.tgz",
|
||||
"integrity": "sha512-EpElU9xdz+WWkZw1SJfLK8hAoP6vFbImbkln++9VqElJhJhKsgs0fRVFS6HwZNxfnb1XsnaSDhHBzrBughgsxg==",
|
||||
"version": "15.0.0-canary.195",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-15.0.0-canary.195.tgz",
|
||||
"integrity": "sha512-GMG3ZeIq5nw+SBjH58wCMf7n3adT9NzeSs8fTb2LLTUPrdceYqombKmufRuPL2svwGByZGnyARCK8B0WEa1Z1w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@next/eslint-plugin-next": {
|
||||
@@ -625,9 +635,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-darwin-arm64": {
|
||||
"version": "15.0.0-canary.135",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.0.0-canary.135.tgz",
|
||||
"integrity": "sha512-A8OS4H3DdGRsq0qEgTbVrF1Lba6UOZPHxhB38fq3gxhMJqz9h7+zaxXslIue7EJm15RSHXumsb/CLeucaid9Gw==",
|
||||
"version": "15.0.0-canary.195",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.0.0-canary.195.tgz",
|
||||
"integrity": "sha512-JK+VB2+AjP8iwe4t8vv3ta6oHlMxegCnSymnSonCtA5HoqRuE7cWe60vbMdk7xmRvl4oy1Josc5+hMei6SN7ZA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -641,9 +651,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-darwin-x64": {
|
||||
"version": "15.0.0-canary.135",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.0.0-canary.135.tgz",
|
||||
"integrity": "sha512-EwdzHu0iZt832W4aQrn5EXUbIjxpQWrNa/oIuAz/VT0qt8Kb87+EsAcGds4i43hMO17/yNyi4QUauA6wrdP2ag==",
|
||||
"version": "15.0.0-canary.195",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.0.0-canary.195.tgz",
|
||||
"integrity": "sha512-M0FTKKvKk3Uhe5rj9jmVv5qmdVDQ7Rc1Ex5BGziNscQVsPrE5tVX768yq6boVvH+WQyt3u2XjZCmIbdTtLAzyg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -657,9 +667,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-arm64-gnu": {
|
||||
"version": "15.0.0-canary.135",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.0.0-canary.135.tgz",
|
||||
"integrity": "sha512-Ri0+Tun75AzlvbpnDvro++MJZfnfRJlzkrR5bdXsYdBQHecjOW8RSKkJT98TwcLuUhgXuPUyZEoWi5tiShC+mA==",
|
||||
"version": "15.0.0-canary.195",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.0.0-canary.195.tgz",
|
||||
"integrity": "sha512-PZaECZ98Ul+dP+azmF3DhH3k4y4vbMH+LtPrRgxas2F8zMDeCfBfYm3MjNc3t7NHAoylVN/+8oxCJrfQ2e8/cw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -673,9 +683,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-arm64-musl": {
|
||||
"version": "15.0.0-canary.135",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.0.0-canary.135.tgz",
|
||||
"integrity": "sha512-5irtGwLGf3D3ykXoKN+MlZOH+02CHKtdR3R/EYfW1P0fkb4/bvJOPtVCWAwy1aPWIsVScBKsjYE5Wn0BWH9R9g==",
|
||||
"version": "15.0.0-canary.195",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.0.0-canary.195.tgz",
|
||||
"integrity": "sha512-AX6pO2RQlBMGrrv/uv4exo2AKRN77a3uRHRrWlrpdQcxrjRWfuS+/7NsCzojGWHX6pUzwvCCcdgKPQpVzAQjzw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -689,9 +699,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-x64-gnu": {
|
||||
"version": "15.0.0-canary.135",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.0.0-canary.135.tgz",
|
||||
"integrity": "sha512-A5iNfPGls67pEsx91QikTKd9mEjYw6ZZthbmGhtgheeY8xgTHRxx1zhbLVbcz/BAqA7wkTlyGOiQ/OKfSaIEFg==",
|
||||
"version": "15.0.0-canary.195",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.0.0-canary.195.tgz",
|
||||
"integrity": "sha512-n651qe/lmps2wgqImkBmde/ygAcrn2mXa5D825NilasjOY02NiJV+crlMO9bB+pOdVgS8P6UDCvPhy/HYFN/YA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -705,9 +715,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-x64-musl": {
|
||||
"version": "15.0.0-canary.135",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.0.0-canary.135.tgz",
|
||||
"integrity": "sha512-lUTcgWTk6w5rp7PC4IwZCXeB3yFpc9ITtIShLP4nM95U8szyR8WFeiMm2KcidwZkqY6FpRHTigR9GW3y87mfYQ==",
|
||||
"version": "15.0.0-canary.195",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.0.0-canary.195.tgz",
|
||||
"integrity": "sha512-HTJ3KwAodiBM6pgYKU5X+awNHuVwNxSSDQ9lNMRO3CJwwL0wI1yLXphx8Pko2RjtQkADLM+1cKdI7metypMxPQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -721,9 +731,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-arm64-msvc": {
|
||||
"version": "15.0.0-canary.135",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.0.0-canary.135.tgz",
|
||||
"integrity": "sha512-KleCymA34fOPOhuk7EqhmOhiYuNKcpVSty/dNWuyChh5kpc03nlw3Z5LfwkxOHXSMDMPAk1DnUmG5UwUDfGBvQ==",
|
||||
"version": "15.0.0-canary.195",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.0.0-canary.195.tgz",
|
||||
"integrity": "sha512-U1VSVP5nyWxAaJ6PPMko7xvCCu6gsmB8OMQ/2ADlCP0duNSZ+TRdPlzsdN7YpBhcHwucVj1hVfbj/hjk3lwaiw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -736,26 +746,10 @@
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-ia32-msvc": {
|
||||
"version": "15.0.0-canary.135",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-15.0.0-canary.135.tgz",
|
||||
"integrity": "sha512-bppVsMMECcgYyuoR1SAoRMT1/Yr6n1VpnxOPxLyoikTzbkG3oMRqCgZrf9F73eowetb0RqwFg/stRbkFBKlSzA==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-x64-msvc": {
|
||||
"version": "15.0.0-canary.135",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.0.0-canary.135.tgz",
|
||||
"integrity": "sha512-/dkaXBPo0vz7iTWif74AZL7VP8QgVXpRvEOyHK3ir+r+OHir0Q7A+pBGQg5cb4JtmLP+KdeznMu442nLFqsyXQ==",
|
||||
"version": "15.0.0-canary.195",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.0.0-canary.195.tgz",
|
||||
"integrity": "sha512-FMzMlpmwvjrAstBuTULJ9+0sFEO632Zy0zG1UZZ4SaL5pxd1FfUaVWq4AsyeObzHY9YxlaK8hBqKyewYoMJ4+g==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -828,9 +822,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@prisma/client": {
|
||||
"version": "5.19.0",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.19.0.tgz",
|
||||
"integrity": "sha512-CzOpau+q1kEWQyoQMvlnXIHqPvwmWbh48xZ4n8KWbAql0p8PC0BIgSTYW5ncxXa4JSEff0tcoxSZB874wDstdg==",
|
||||
"version": "5.21.0",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.21.0.tgz",
|
||||
"integrity": "sha512-Qf2YleB3dsCRXiKSQZ+j0aF5E+ojpfqF8ExXaNAWBbAhKapMduwNvgo13K2pEuTiQq8voG2aQPQnxjsO9fOpTQ==",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
@@ -909,9 +903,9 @@
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/@swc/helpers": {
|
||||
"version": "0.5.12",
|
||||
"resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.12.tgz",
|
||||
"integrity": "sha512-KMZNXiGibsW9kvZAO1Pam2JPTDBm+KSHMMHWdsyI/1DbIZjT2A6Gy3hblVXUMEDvUAKq+e0vL0X0o54owWji7g==",
|
||||
"version": "0.5.13",
|
||||
"resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.13.tgz",
|
||||
"integrity": "sha512-UoKGxQ3r5kYI9dALKJapMmuK+1zWM/H17Z1+iwnNmzcJRnfFuevZs375TA5rW31pu4BS4NoSy1fRsexDXfWn5w==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"tslib": "^2.4.0"
|
||||
@@ -2975,6 +2969,7 @@
|
||||
"version": "4.2.11",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
|
||||
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/graphemer": {
|
||||
@@ -3642,7 +3637,6 @@
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/js-yaml": {
|
||||
@@ -3796,7 +3790,6 @@
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
||||
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"js-tokens": "^3.0.0 || ^4.0.0"
|
||||
@@ -3914,17 +3907,16 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/next": {
|
||||
"version": "15.0.0-canary.135",
|
||||
"resolved": "https://registry.npmjs.org/next/-/next-15.0.0-canary.135.tgz",
|
||||
"integrity": "sha512-xR6MUpaVS2H8Ktp7ZDICHFvdDdvD/VfzSFfuvZLMMTluTZL2NuM4CVS9bHXIlMPo897MyWTfFFoPoamHXItxQw==",
|
||||
"version": "15.0.0-canary.195",
|
||||
"resolved": "https://registry.npmjs.org/next/-/next-15.0.0-canary.195.tgz",
|
||||
"integrity": "sha512-6oFt67faSIAcXthtj37IIVETENBReNrrxwJ4ggDL72rULoONhmvohJhg6S/cCxfkw9lVqh7CHG0rjj1zhH6mUA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@next/env": "15.0.0-canary.135",
|
||||
"@next/env": "15.0.0-canary.195",
|
||||
"@swc/counter": "0.1.3",
|
||||
"@swc/helpers": "0.5.12",
|
||||
"@swc/helpers": "0.5.13",
|
||||
"busboy": "1.6.0",
|
||||
"caniuse-lite": "^1.0.30001579",
|
||||
"graceful-fs": "^4.2.11",
|
||||
"postcss": "8.4.31",
|
||||
"styled-jsx": "5.1.6"
|
||||
},
|
||||
@@ -3935,23 +3927,22 @@
|
||||
"node": ">=18.18.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@next/swc-darwin-arm64": "15.0.0-canary.135",
|
||||
"@next/swc-darwin-x64": "15.0.0-canary.135",
|
||||
"@next/swc-linux-arm64-gnu": "15.0.0-canary.135",
|
||||
"@next/swc-linux-arm64-musl": "15.0.0-canary.135",
|
||||
"@next/swc-linux-x64-gnu": "15.0.0-canary.135",
|
||||
"@next/swc-linux-x64-musl": "15.0.0-canary.135",
|
||||
"@next/swc-win32-arm64-msvc": "15.0.0-canary.135",
|
||||
"@next/swc-win32-ia32-msvc": "15.0.0-canary.135",
|
||||
"@next/swc-win32-x64-msvc": "15.0.0-canary.135",
|
||||
"sharp": "^0.33.4"
|
||||
"@next/swc-darwin-arm64": "15.0.0-canary.195",
|
||||
"@next/swc-darwin-x64": "15.0.0-canary.195",
|
||||
"@next/swc-linux-arm64-gnu": "15.0.0-canary.195",
|
||||
"@next/swc-linux-arm64-musl": "15.0.0-canary.195",
|
||||
"@next/swc-linux-x64-gnu": "15.0.0-canary.195",
|
||||
"@next/swc-linux-x64-musl": "15.0.0-canary.195",
|
||||
"@next/swc-win32-arm64-msvc": "15.0.0-canary.195",
|
||||
"@next/swc-win32-x64-msvc": "15.0.0-canary.195",
|
||||
"sharp": "^0.33.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@opentelemetry/api": "^1.1.0",
|
||||
"@playwright/test": "^1.41.2",
|
||||
"babel-plugin-react-compiler": "*",
|
||||
"react": "19.0.0-rc-7771d3a7-20240827",
|
||||
"react-dom": "19.0.0-rc-7771d3a7-20240827",
|
||||
"react": "^18.2.0 || 19.0.0-rc-cd22717c-20241013",
|
||||
"react-dom": "^18.2.0 || 19.0.0-rc-cd22717c-20241013",
|
||||
"sass": "^1.3.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
@@ -4576,26 +4567,30 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/react": {
|
||||
"version": "19.0.0-rc-7771d3a7-20240827",
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-19.0.0-rc-7771d3a7-20240827.tgz",
|
||||
"integrity": "sha512-Xg6LoxgPpT4efYHzRB2gUUQCoNXu2df3sOBRgiUvzTVT1qQNOV611/w80JiOmnTWlIyCaUfSkNrMG8OUO/D+AA==",
|
||||
"version": "18.3.1",
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
|
||||
"integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-dom": {
|
||||
"version": "19.0.0-rc-7771d3a7-20240827",
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0-rc-7771d3a7-20240827.tgz",
|
||||
"integrity": "sha512-EMgZJX6EEQEr+pso+9ySkrEMPv3N7zF2fbi0f6uB+X7r8E+O2GqPRcIHtFigMdW8uS0XCVFHAocMnIc4yPULYQ==",
|
||||
"version": "18.3.1",
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
|
||||
"integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"scheduler": "0.25.0-rc-7771d3a7-20240827"
|
||||
"loose-envify": "^1.1.0",
|
||||
"scheduler": "^0.23.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "19.0.0-rc-7771d3a7-20240827"
|
||||
"react": "^18.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/react-is": {
|
||||
@@ -4819,11 +4814,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/scheduler": {
|
||||
"version": "0.25.0-rc-7771d3a7-20240827",
|
||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0-rc-7771d3a7-20240827.tgz",
|
||||
"integrity": "sha512-n4nHmAoerbIOSrH24w0+fcdCUwQ4Npm7yXfsrn09FL01OWIaxpuo4P0rj3qPyLFgsJDbn18sWvLVB/e/KPnR+A==",
|
||||
"version": "0.23.2",
|
||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",
|
||||
"integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.6.3",
|
||||
|
||||
+2
-1
@@ -9,9 +9,10 @@
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@heroicons/react": "^2.1.5",
|
||||
"@prisma/client": "^5.18.0",
|
||||
"js-sha256": "^0.11.0",
|
||||
"next": "^15.0.0-canary.135",
|
||||
"next": "^15.0.0-canary.195",
|
||||
"ua-parser-js": "^1.0.38",
|
||||
"zod": "^3.23.8"
|
||||
},
|
||||
|
||||
+27
-17
@@ -11,11 +11,12 @@ datasource db {
|
||||
model Page {
|
||||
uuid String @id @default(uuid())
|
||||
shortcode String @unique
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
RedirectPage RedirectPage[]
|
||||
CustomPage CustomPage[]
|
||||
Stat Stat[]
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
redirectPage RedirectPage[]
|
||||
customPage CustomPage[]
|
||||
stat Stat[]
|
||||
pinnedPage PinnedPage?
|
||||
|
||||
@@index([shortcode])
|
||||
}
|
||||
@@ -23,13 +24,13 @@ model Page {
|
||||
// The redirect page for the url shortener
|
||||
model RedirectPage {
|
||||
uuid String @id @default(uuid())
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
dest String
|
||||
|
||||
page Page @relation(fields: [pageUuid], references: [uuid])
|
||||
pageUuid String
|
||||
LinkBlock LinkBlock[]
|
||||
linkBlock LinkBlock[]
|
||||
}
|
||||
|
||||
// The custom page to display mutliple blocks of text and links
|
||||
@@ -42,8 +43,8 @@ model CustomPage {
|
||||
|
||||
page Page @relation(fields: [pageUuid], references: [uuid])
|
||||
pageUuid String
|
||||
TextBlock TextBlock[]
|
||||
LinkBlock LinkBlock[]
|
||||
textBlock TextBlock[]
|
||||
linkBlock LinkBlock[]
|
||||
}
|
||||
|
||||
// Text block to be displayed on the custom page
|
||||
@@ -52,10 +53,10 @@ model TextBlock {
|
||||
uuid String @id @default(uuid())
|
||||
order Int
|
||||
text String
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
custom_page CustomPage @relation(fields: [customPageUuid], references: [uuid])
|
||||
customPage CustomPage @relation(fields: [customPageUuid], references: [uuid])
|
||||
customPageUuid String
|
||||
}
|
||||
|
||||
@@ -65,8 +66,8 @@ model LinkBlock {
|
||||
order Int
|
||||
title String
|
||||
|
||||
custom_page CustomPage @relation(fields: [customPageUuid], references: [uuid])
|
||||
redirect_page RedirectPage @relation(fields: [redirectPageUuid], references: [uuid])
|
||||
customPage CustomPage @relation(fields: [customPageUuid], references: [uuid])
|
||||
redirectPage RedirectPage @relation(fields: [redirectPageUuid], references: [uuid])
|
||||
customPageUuid String
|
||||
redirectPageUuid String
|
||||
}
|
||||
@@ -74,10 +75,19 @@ model LinkBlock {
|
||||
// Statts to track the links being accessed
|
||||
model Stat {
|
||||
uuid String @id @default(uuid())
|
||||
accessed_at DateTime @default(now())
|
||||
accessedAt DateTime @default(now())
|
||||
hash String? @db.VarChar(64)
|
||||
user_agent String? @db.Text
|
||||
userAgent String? @db.Text
|
||||
|
||||
page Page @relation(fields: [pageUuid], references: [uuid])
|
||||
pageUuid String
|
||||
}
|
||||
|
||||
model PinnedPage {
|
||||
id Int @id @default(1)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
page Page @relation(fields: [pageUuid], references: [uuid])
|
||||
pageUuid String @unique
|
||||
}
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
import { z } from "zod";
|
||||
import prisma from "../../prisma/prisma";
|
||||
import { revalidatePath } from "next/cache";
|
||||
import { title } from "process";
|
||||
|
||||
|
||||
export async function createLinkBlock(prevState: any, formData: FormData) {
|
||||
|
||||
@@ -44,9 +42,9 @@ export async function createLinkBlock(prevState: any, formData: FormData) {
|
||||
|
||||
const page = await prisma.page.findUnique({
|
||||
where: { shortcode: data.data.redirectPageShortcode },
|
||||
include: { RedirectPage: true }
|
||||
include: { redirectPage: true }
|
||||
});
|
||||
const redirectPage = page?.RedirectPage[0]
|
||||
const redirectPage = page?.redirectPage[0]
|
||||
if (!redirectPage) {
|
||||
return {
|
||||
message: "Redirect page not found",
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import { z } from "zod";
|
||||
import prisma from "../../prisma/prisma";
|
||||
import { revalidatePath } from "next/cache";
|
||||
import { error } from "console";
|
||||
|
||||
export async function createCustomPage(prevState: any, fromData: FormData) {
|
||||
const schema = z.object({
|
||||
@@ -147,3 +148,41 @@ export async function deletePage(prevState: any, fromData: FormData) {
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
export async function pinPageToRoot(prevState: any, fromData: FormData) {
|
||||
const schema = z.object({
|
||||
uuid: z.string().uuid()
|
||||
});
|
||||
|
||||
const data = schema.safeParse({
|
||||
uuid: fromData.get("uuid")
|
||||
});
|
||||
|
||||
if (!data.success) {
|
||||
return {
|
||||
message: "Invalid data",
|
||||
error: data.error.flatten().fieldErrors,
|
||||
};
|
||||
}
|
||||
|
||||
await prisma.pinnedPage.upsert({
|
||||
where: {
|
||||
id: 1
|
||||
},
|
||||
update: {
|
||||
pageUuid: data.data.uuid
|
||||
},
|
||||
create: {
|
||||
id: 1,
|
||||
pageUuid: data.data.uuid
|
||||
}
|
||||
});
|
||||
|
||||
revalidatePath("/dash");
|
||||
revalidatePath("/");
|
||||
|
||||
return {
|
||||
message: "Page pinned",
|
||||
};
|
||||
|
||||
}
|
||||
@@ -6,12 +6,13 @@ import CustomPageComponent from "@/components/CustomPageComponent";
|
||||
|
||||
export default async function RedirectToUrl({ params }: { params: { shortcode: string } }) {
|
||||
|
||||
const { shortcode } = await params;
|
||||
|
||||
const page = await prisma.page.findUnique({
|
||||
where: {shortcode: params.shortcode},
|
||||
where: {shortcode: shortcode},
|
||||
include: {
|
||||
RedirectPage: true,
|
||||
CustomPage: true
|
||||
redirectPage: true,
|
||||
customPage: true
|
||||
}
|
||||
});
|
||||
|
||||
@@ -21,7 +22,7 @@ export default async function RedirectToUrl({ params }: { params: { shortcode: s
|
||||
}
|
||||
|
||||
// Logg the visit
|
||||
const requestHeaders = headers();
|
||||
const requestHeaders = await headers();
|
||||
const userAgent = requestHeaders.get('user-agent') || 'unknown';
|
||||
const ip = requestHeaders.get('x-forwarded-for') || 'unknown';
|
||||
const anonymIp = ip.replace(/(\d+)\.(\d+)\.(\d+)\.(\d+)/, '$1.$2.$3.0');
|
||||
@@ -29,21 +30,21 @@ export default async function RedirectToUrl({ params }: { params: { shortcode: s
|
||||
await prisma.stat.create({
|
||||
data: {
|
||||
pageUuid: page.uuid,
|
||||
user_agent: userAgent,
|
||||
userAgent: userAgent,
|
||||
hash: hash
|
||||
}
|
||||
});
|
||||
|
||||
if (page.RedirectPage.length>0) {
|
||||
if (page.redirectPage.length>0) {
|
||||
|
||||
// Redirect to the destination
|
||||
const redirectPage = page.RedirectPage[0];
|
||||
const redirectPage = page.redirectPage[0];
|
||||
redirect(redirectPage.dest);
|
||||
|
||||
}else if (page.CustomPage.length>0) {
|
||||
}else if (page.customPage.length>0) {
|
||||
|
||||
// Show the custom page
|
||||
const customPage = page.CustomPage[0];
|
||||
const customPage = page.customPage[0];
|
||||
return <CustomPageComponent customPage={customPage}/>
|
||||
|
||||
} else {
|
||||
|
||||
+9
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
|
||||
body {
|
||||
@apply text-gray-300 bg-gray-900 m-10
|
||||
@apply text-gray-300 bg-gray-900
|
||||
}
|
||||
|
||||
h1 {
|
||||
@@ -46,3 +46,11 @@ label {
|
||||
button {
|
||||
@apply rounded bg-green-600 hover:bg-green-700 text-white py-2 px-4 disabled:opacity-50
|
||||
}
|
||||
|
||||
.zebra {
|
||||
@apply odd:bg-slate-800 p-2 rounded
|
||||
}
|
||||
|
||||
.common-red {
|
||||
@apply text-red-500
|
||||
}
|
||||
+10
-1
@@ -1,7 +1,16 @@
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import prisma from "../../prisma/prisma";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
export default async function Home() {
|
||||
|
||||
const pinnedPage = await prisma.pinnedPage.findFirst({where: {id: 1}, include: {page: true}});
|
||||
|
||||
if (pinnedPage) {
|
||||
redirect(pinnedPage.page.shortcode);
|
||||
}
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
(<>
|
||||
<h1>Home</h1>
|
||||
|
||||
@@ -1,44 +1,48 @@
|
||||
import Image from "next/image";
|
||||
import prisma from "../../../../../prisma/prisma";
|
||||
import { redirect } from "next/navigation";
|
||||
import DeletePageForm from "@/components/forms/deletePageForm";
|
||||
import { hashToColor } from "@/utils";
|
||||
import Link from "next/link";
|
||||
import CreateCustomPageForm from "@/components/forms/createCustomPageForm";
|
||||
import CreateLinkBlockForm from "@/components/forms/createLinkBlockForm";
|
||||
import Image from "next/image";
|
||||
import DeletePageForm from "@/components/forms/deletePageForm";
|
||||
import CustomPageDashboard from "@/components/CustomPageDashboard";
|
||||
import LinkFavicon from "@/components/LinkFavicon";
|
||||
import { hashToColor } from "@/utils";
|
||||
import PinPageToRootForm from "@/components/forms/pinPageToRootForm";
|
||||
|
||||
export default async function DetailedStats({ params }: { params: { uuid: string } }) {
|
||||
|
||||
const { uuid } = await params;
|
||||
|
||||
const page = await prisma.page.findUnique({
|
||||
where: { uuid: params.uuid },
|
||||
where: { uuid: uuid },
|
||||
include: {
|
||||
RedirectPage: true,
|
||||
CustomPage: true,
|
||||
Stat: { orderBy: { accessed_at: "desc" } },
|
||||
pinnedPage: true,
|
||||
redirectPage: true,
|
||||
customPage: true,
|
||||
stat: { orderBy: { accessedAt: "desc" } },
|
||||
_count: {
|
||||
select: { Stat: true }
|
||||
select: { stat: true }
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
// group stats by hash
|
||||
|
||||
const stats = await prisma.stat.groupBy({
|
||||
by: ['hash', 'user_agent'],
|
||||
by: ['hash', 'userAgent'],
|
||||
where: {
|
||||
pageUuid: params.uuid
|
||||
pageUuid: uuid
|
||||
},
|
||||
_count: {
|
||||
uuid: true
|
||||
},
|
||||
_max: {
|
||||
accessed_at: true
|
||||
accessedAt: true
|
||||
},
|
||||
orderBy: {
|
||||
_max: {
|
||||
accessed_at: "desc"
|
||||
accessedAt: "desc"
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -48,8 +52,8 @@ export default async function DetailedStats({ params }: { params: { uuid: string
|
||||
//return notFound();
|
||||
}
|
||||
|
||||
const redirectPage = page.RedirectPage[0];
|
||||
const customPage = page.CustomPage[0];
|
||||
const redirectPage = page.redirectPage[0];
|
||||
const customPage = page.customPage[0];
|
||||
|
||||
// get shortcodes if the page is a custom page to use in the link block form
|
||||
const linkPages = customPage ? await prisma.redirectPage.findMany({ include: { page: true } }) : undefined
|
||||
@@ -66,18 +70,25 @@ export default async function DetailedStats({ params }: { params: { uuid: string
|
||||
width={100}
|
||||
height={100}
|
||||
alt=" "
|
||||
className="rounded-full"
|
||||
/>}
|
||||
</div>
|
||||
: ""}
|
||||
|
||||
<div>
|
||||
<p>Shortcode: {page.shortcode}</p>
|
||||
{page.RedirectPage.length > 0 ?
|
||||
<p><a className="underline" href={page.RedirectPage[0].dest}>{page.RedirectPage[0].dest}</a></p> : ""}
|
||||
{page.redirectPage.length > 0 ?
|
||||
<p><a className="underline" href={page.redirectPage[0].dest}>{page.redirectPage[0].dest}</a></p> : ""}
|
||||
</div>
|
||||
<div className="ml-5">
|
||||
{page.pinnedPage ? <p className="common-red">Pinned to root</p> : ""}
|
||||
</div>
|
||||
<div className="ml-auto">
|
||||
<Link href={`/${page.shortcode}`}><button>View</button></Link>
|
||||
</div>
|
||||
<div className="ml-5">
|
||||
<PinPageToRootForm pageUuid={page.uuid} disabled={!!page.pinnedPage} />
|
||||
</div>
|
||||
<div className="ml-5">
|
||||
<DeletePageForm uuid={page.uuid} />
|
||||
</div>
|
||||
@@ -87,23 +98,22 @@ export default async function DetailedStats({ params }: { params: { uuid: string
|
||||
{customPage ? <CustomPageDashboard customPage={customPage} /> : ""}
|
||||
|
||||
<h2 className="mt-5">Stats</h2>
|
||||
<p className="mt-5">All visits (not unique): {page._count.Stat}</p>
|
||||
<p className="mt-5">All visits (not unique): {page._count.stat}</p>
|
||||
<br></br>
|
||||
<h2>Visitors</h2>
|
||||
{stats.map((stat) => (<div className="my-5" key={stat.hash}>
|
||||
<p>{stat.user_agent}</p>
|
||||
{stats.map((stat) => (<div className="zebra" key={stat.hash}>
|
||||
<p>{stat.userAgent}</p>
|
||||
<p style={{ color: hashToColor(stat.hash) }}>{stat.hash}</p>
|
||||
<p>Visits: {"" + stat._count.uuid}</p>
|
||||
<p>Last Visit: {stat._max.accessed_at?.toDateString()}</p>
|
||||
<p>Last Visit: {stat._max.accessedAt?.toDateString()}</p>
|
||||
</div>))}
|
||||
|
||||
<h2>All Visits</h2>
|
||||
|
||||
{page.Stat.map((stat) => (<div className="my-5" key={stat.uuid}>
|
||||
<p>{stat.accessed_at.toDateString()}</p>
|
||||
<p>{stat.user_agent}</p>
|
||||
{/* <h2>All Visits</h2>
|
||||
{page.stat.map((stat) => (<div className="my-5" key={stat.uuid}>
|
||||
<p>{stat.accessedAt.toDateString()}</p>
|
||||
<p>{stat.userAgent}</p>
|
||||
<p style={{ color: hashToColor(stat.hash) }}>{stat.hash}</p>
|
||||
</div>))}
|
||||
</div>))} */}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import React, { ReactNode } from 'react';
|
||||
|
||||
export default function Dashboard({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<div>
|
||||
<div className='p-10 max-w-7xl mx-auto'>
|
||||
<Link href="/~/dash/">
|
||||
<h1>Dashboard</h1>
|
||||
</Link>
|
||||
|
||||
@@ -9,16 +9,17 @@ export default async function Dashboard() {
|
||||
|
||||
const pages = await prisma.page.findMany({
|
||||
include: {
|
||||
RedirectPage: true,
|
||||
CustomPage: true,
|
||||
pinnedPage: true,
|
||||
redirectPage: true,
|
||||
customPage: true,
|
||||
_count: {
|
||||
select: { Stat: true }
|
||||
select: { stat: true }
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const redirectPages = pages.filter((page) => page.RedirectPage.length > 0);
|
||||
const customPages = pages.filter((page) => page.CustomPage.length > 0);
|
||||
const redirectPages = pages.filter((page) => page.redirectPage.length > 0);
|
||||
const customPages = pages.filter((page) => page.customPage.length > 0);
|
||||
|
||||
return (<>
|
||||
<h2>Redirect Pages</h2>
|
||||
|
||||
@@ -14,12 +14,12 @@ export default async function CustomPageComponent(params: { customPage: CustomPa
|
||||
order: "asc"
|
||||
},
|
||||
include: {
|
||||
redirect_page: { include: { page: true } }
|
||||
redirectPage: { include: { page: true } }
|
||||
}
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="flex flex-col items-center justify-center">
|
||||
<div className="flex flex-col items-center justify-center min-h-screen">
|
||||
<Image
|
||||
src={`data:image/png;base64,${customPage.image}`}
|
||||
alt=" "
|
||||
@@ -29,13 +29,13 @@ export default async function CustomPageComponent(params: { customPage: CustomPa
|
||||
/>
|
||||
|
||||
<h1 className="mt-5 text-center">{customPage.title}</h1>
|
||||
<div className="w-full max-w-96">
|
||||
<div className="w-full max-w-96 mb-40 p-2">
|
||||
|
||||
{linkBlocks.map((block) => (
|
||||
<button key={block.uuid} className="bg-slate-600 hover:bg-slate-500 w-full m-2">
|
||||
<a href={`/${block.redirect_page.page.shortcode}`}>
|
||||
<button key={block.uuid} className="bg-slate-600 hover:bg-slate-500 w-full my-2">
|
||||
<a href={`/${block.redirectPage.page.shortcode}`}>
|
||||
<div className="relative flex items-center">
|
||||
<div className="flex-shrink-0"><LinkFavicon url={block.redirect_page.dest} /></div>
|
||||
<div className="flex-shrink-0"><LinkFavicon url={block.redirectPage.dest} /></div>
|
||||
<div className="absolute left-1/2 transform -translate-x-1/2 text-center font-bold">{block.title}</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
@@ -17,25 +17,25 @@ export default async function CustomPageDashboard(params: { customPage: CustomPa
|
||||
order: "asc"
|
||||
},
|
||||
include: {
|
||||
redirect_page: { include: { page: true } }
|
||||
redirectPage: { include: { page: true } }
|
||||
}
|
||||
});
|
||||
|
||||
return (<>
|
||||
{linkBlocks.map((block) => (
|
||||
|
||||
<div key={block.uuid} className="flex items-center justify-center mb-2 odd:bg-slate-800 p-2">
|
||||
<div key={block.uuid} className="flex items-center justify-center mb-2 zebra">
|
||||
<div className="mr-5">order: {block.order}</div>
|
||||
<div className="mr-5">title: <span className="font-bold">{block.title}</span></div>
|
||||
<div>connected link page: <span className="font-bold">{block.redirect_page.page.shortcode}</span></div>
|
||||
<div>connected link page: <span className="font-bold">{block.redirectPage.page.shortcode}</span></div>
|
||||
<div className="ml-auto">
|
||||
<button>
|
||||
<a href={`/${block.redirect_page.page.shortcode}`} className="btn btn-primary">Visit</a>
|
||||
<a href={`/${block.redirectPage.page.shortcode}`} className="btn btn-primary">Visit</a>
|
||||
</button>
|
||||
</div>
|
||||
<div className="ml-5">
|
||||
<button>
|
||||
<a href={`/~/dash/${block.redirect_page.page.uuid}`} className="btn btn-primary">Details</a>
|
||||
<a href={`/~/dash/${block.redirectPage.page.uuid}`} className="btn btn-primary">Details</a>
|
||||
</button>
|
||||
</div>
|
||||
<div className="ml-5">
|
||||
|
||||
@@ -3,7 +3,6 @@ import Image from "next/image";
|
||||
export default function LinkFavicon({ url }: { url: string }) {
|
||||
|
||||
const hostname = new URL(url).hostname;
|
||||
console.log(hostname);
|
||||
|
||||
return (<div className=" h-10 w-10">
|
||||
<Image
|
||||
@@ -11,6 +10,7 @@ export default function LinkFavicon({ url }: { url: string }) {
|
||||
width={100}
|
||||
height={100}
|
||||
alt=" "
|
||||
className="rounded-full"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,25 +1,26 @@
|
||||
import React from 'react';
|
||||
import type { Prisma } from '@prisma/client';
|
||||
import DeletePageForm from './forms/deletePageForm';
|
||||
import Image from 'next/image';
|
||||
import Link from 'next/link';
|
||||
import prisma from '../../prisma/prisma';
|
||||
import LinkFavicon from './LinkFavicon';
|
||||
import PinPageToRootForm from './forms/pinPageToRootForm';
|
||||
|
||||
type PageWithRelations = Prisma.PageGetPayload<{
|
||||
include: {
|
||||
RedirectPage: true;
|
||||
CustomPage: true;
|
||||
pinnedPage: true;
|
||||
redirectPage: true;
|
||||
customPage: true;
|
||||
_count: {
|
||||
select: { Stat: true }
|
||||
select: { stat: true }
|
||||
}
|
||||
}
|
||||
}>
|
||||
|
||||
export default async function PageListComponent({ page }: { page: PageWithRelations }) {
|
||||
|
||||
const redirectPage = page.RedirectPage[0];
|
||||
const customPage = page.CustomPage[0];
|
||||
const redirectPage = page.redirectPage[0];
|
||||
const customPage = page.customPage[0];
|
||||
|
||||
|
||||
return (
|
||||
<Link href={`/~/dash/${page.uuid}`}>
|
||||
@@ -32,6 +33,7 @@ export default async function PageListComponent({ page }: { page: PageWithRelati
|
||||
height={100}
|
||||
src={`data:image/png;base64,${customPage.image}`}
|
||||
alt="icon"
|
||||
className="rounded-full"
|
||||
/>}
|
||||
</div>
|
||||
<div>
|
||||
@@ -39,8 +41,11 @@ export default async function PageListComponent({ page }: { page: PageWithRelati
|
||||
<p className="text-sm text-gray-400">{redirectPage ? redirectPage.dest : customPage.title}</p>
|
||||
|
||||
</div>
|
||||
<div className="ml-5">
|
||||
{page.pinnedPage ? <p className="text-red-500">Pinned to root</p> : ""}
|
||||
</div>
|
||||
<div className="ml-auto">
|
||||
{page._count.Stat ? <p className="text-gray-400 font-bold">{page._count.Stat} visits</p> : ""}
|
||||
{page._count.stat ? <p className="text-gray-400 font-bold">{page._count.stat} visits</p> : ""}
|
||||
{//<DeletePageForm uuid={page.uuid} />
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
"use client"
|
||||
import { pinPageToRoot } from "@/actions/page_actions";
|
||||
import { BookmarkIcon } from "@heroicons/react/24/solid";
|
||||
import { useActionState, useState } from "react";
|
||||
|
||||
export default function PinPageToRootForm({ pageUuid, disabled }: { pageUuid: string, disabled: boolean }) {
|
||||
|
||||
const initialState = {
|
||||
message: "",
|
||||
error: {}
|
||||
};
|
||||
|
||||
const [state, formAction] = useActionState(pinPageToRoot, initialState);
|
||||
|
||||
|
||||
return ( <form action={formAction}>
|
||||
<input type="hidden" name="uuid" value={pageUuid} />
|
||||
{/* <p>{state.message}</p> */}
|
||||
<button type="submit" className="btn btn-primary" disabled={disabled}><BookmarkIcon className="h-5 w-5 inline-block align-middle"/></button>
|
||||
</form>)
|
||||
}
|
||||
Reference in New Issue
Block a user