We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8547cb3 commit 8e6c51aCopy full SHA for 8e6c51a
src/components/auth-required/main/Section/index.tsx
@@ -15,16 +15,17 @@ export const Section = (p: PostType) => {
15
const client = useQueryClient();
16
17
const { username } = client.getQueryData([PATHS.ME]) as UserDto;
18
- const { NEXT_PUBLIC_VELOG_URL } = process.env;
+ const URL = process.env.NEXT_PUBLIC_VELOG_URL;
19
20
if (!username) {
21
throw new UserNameNotFoundError();
22
}
23
- if (!NEXT_PUBLIC_VELOG_URL) {
+
24
+ if (!URL) {
25
throw new EnvNotFoundError('NEXT_PUBLIC_VELOG_URL');
26
27
- const url = `${NEXT_PUBLIC_VELOG_URL}/@${username}/${p.slug}`;
28
+ const url = `${URL}/@${username}/${p.slug}`;
29
30
return (
31
<section className="flex flex-col w-full h-fit relative">
0 commit comments