Skip to content

Commit

Permalink
Merge pull request #160 from besscroft/v2
Browse files Browse the repository at this point in the history
🐛 修复某些情况下,通过图片分享链接无法打开的问题。
  • Loading branch information
besscroft authored Nov 16, 2024
2 parents b319899 + 776dff3 commit 04b9dbd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/admin/about/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function About() {
/>
</svg>

<p className="whitespace-nowrap text-sm">v2.0.2</p>
<p className="whitespace-nowrap text-sm">v2.0.3</p>
</span>
<span>PicImpact 是一个摄影师专用的摄影作品展示网站,基于 Next.js + Hono.js 开发。</span>
<div className="flex flex-col w-full">
Expand Down
6 changes: 3 additions & 3 deletions components/Masonry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function Masonry(props : Readonly<ImageHandleProps>) {
)

useEffect(() => {
const fetchData = async (id: number) => {
const fetchData = async (id: string) => {
try {
const res = await fetch(`/api/open/get-image-by-id?id=${id}`, {
headers: {
Expand All @@ -66,8 +66,8 @@ export default function Masonry(props : Readonly<ImageHandleProps>) {
}
};
const id = searchParams.get('id')
if (Number(id) > 0) {
fetchData(Number(id));
if (id) {
fetchData(id);
}
}, []);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "picimpact",
"version": "2.0.2",
"version": "2.0.3",
"private": true,
"author": "Bess Croft <[email protected]>",
"packageManager": "[email protected]",
Expand Down

0 comments on commit 04b9dbd

Please sign in to comment.