Skip to content

Commit

Permalink
fix(frontend): serverContextの値を利用する条件が間違っていたのを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
kakkokari-gtyih committed Dec 22, 2024
1 parent f123be3 commit f2ea792
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/clip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import { genEmbedCode } from '@/scripts/get-embed-code.js';
import { assertServerContext, serverContext } from '@/server-context.js';

// contextは非ログイン状態の情報しかないためログイン時は利用できない
const CTX_CLIP = $i && assertServerContext(serverContext, 'clip') ? serverContext.clip : null;
const CTX_CLIP = !$i && assertServerContext(serverContext, 'clip') ? serverContext.clip : null;

const props = defineProps<{
clipId: string,
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/note.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ import { serverContext, assertServerContext } from '@/server-context.js';
import { $i } from '@/account.js';

// contextは非ログイン状態の情報しかないためログイン時は利用できない
const CTX_NOTE = $i && assertServerContext(serverContext, 'note') ? serverContext.note : null;
const CTX_NOTE = !$i && assertServerContext(serverContext, 'note') ? serverContext.note : null;

const props = defineProps<{
noteId: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/user/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const XGallery = defineAsyncComponent(() => import('./gallery.vue'));
const XRaw = defineAsyncComponent(() => import('./raw.vue'));

// contextは非ログイン状態の情報しかないためログイン時は利用できない
const CTX_USER = $i && assertServerContext(serverContext, 'user') ? serverContext.user : null;
const CTX_USER = !$i && assertServerContext(serverContext, 'user') ? serverContext.user : null;

const props = withDefaults(defineProps<{
acct: string;
Expand Down

0 comments on commit f2ea792

Please sign in to comment.