Skip to content

Commit

Permalink
초기 페이지 접근시 theme에 string type undefined가 할당되는 오류 수정 (09.27)
Browse files Browse the repository at this point in the history
초기 페이지 접근시 theme에 string type undefined가 할당되는 오류 수정 (09.27)
  • Loading branch information
seoko97 authored Sep 27, 2023
2 parents 4525f86 + 768df64 commit 79f2ba4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
Binary file modified public/SEOKO.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/app/about/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { siteMetadata } from "@utils/constant/metadata";

export const generateMetadata = (): Metadata => {
const { openGraph, ...rest } = generateDefaultMetadata({
title: `${siteMetadata.title} - About}`,
title: "About",
description: siteMetadata.description,
url: `${siteMetadata.siteUrl}/about`,
});
Expand Down
4 changes: 3 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ const RootLayout = ({ children }: { children: React.ReactNode }) => {
function setBodyDatasetByTheme() {
const prefersDarkFromMq = window.matchMedia("(prefers-color-scheme: dark)").matches;

const persistedPreference = localStorage.getItem("theme");
const theme = localStorage.getItem("theme");

const persistedPreference = theme === "undefined" ? null : theme;

const colorMode = persistedPreference || (prefersDarkFromMq ? "dark" : "light");

Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/Series/page.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Series = () => {
className="group flex cursor-pointer flex-col items-center justify-start gap-3"
>
<div className="w-full flex-1 rounded-b-md rounded-t-md">
<Image src={series.thumbnail ?? "/main.jpg"} alt={series.name} priority />
<Image src={series.thumbnail ?? "/SEOKO.png"} alt={series.name} priority />
</div>
<div className="flex w-full flex-col gap-2">
<h3 className="truncate font-semibold text-primary transition-[color] group-hover:text-effect1">
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/query/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const useUploadImageMutation = (type: TImageType) => {
};

const useUploadImage = ({ type, defaultImg }: IProps) => {
const [image, setImage] = useState<string>(defaultImg || "/main.jpg");
const [image, setImage] = useState<string>(defaultImg || "/SEOKO.png");

const onChangeImage = async (e: React.ChangeEvent<HTMLInputElement>) => {
const file = e.target.files?.[0];
Expand Down

0 comments on commit 79f2ba4

Please sign in to comment.