Compare commits
4 Commits
341b0d6e9d
...
3b706c0092
| Author | SHA1 | Date | |
|---|---|---|---|
| 3b706c0092 | |||
| baa3061685 | |||
| fd61895bbd | |||
| cdcb09e24b |
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { BuilderSectionsFragment } from "#graphql/fragments";
|
||||
import type { BuilderSectionsFragment } from "#graphql/operations";
|
||||
|
||||
const props = defineProps<BuilderSectionsFragment>();
|
||||
const sections = computed(() => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { LayoutContainedFragment } from "#graphql/fragments";
|
||||
import type { LayoutContainedFragment } from "#graphql/operations";
|
||||
import { tv, type VariantProps } from "tailwind-variants";
|
||||
|
||||
const props = defineProps<LayoutContainedFragment>();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { NodePageFragment } from "#graphql/fragments";
|
||||
import type { NodePageFragment } from "#graphql/operations";
|
||||
|
||||
defineProps<NodePageFragment>();
|
||||
</script>
|
||||
@@ -9,6 +9,6 @@ defineProps<NodePageFragment>();
|
||||
<h1 v-if="!isFrontPage" class="font-bold text-4xl">
|
||||
{{ title }}
|
||||
</h1>
|
||||
<BuilderSections v-bind="groupPostPage" />
|
||||
<BuilderSections :sections="groupPostPage?.sections || []" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { SectionTextBlockFragment } from "#graphql/fragments";
|
||||
import type { SectionTextBlockFragment } from "#graphql/operations";
|
||||
|
||||
defineProps<SectionTextBlockFragment>();
|
||||
</script>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@iconify-json/lucide": "^1.2.86",
|
||||
"@lewebsimple/nuxt-graphql": "^0.5.2",
|
||||
"@lewebsimple/nuxt-graphql": "^0.5.10",
|
||||
"@nuxt/ui": "4.3.0",
|
||||
"@nuxtjs/seo": "^3.3.0",
|
||||
"jwt-decode": "^4.0.0",
|
||||
|
||||
687
wp-content/themes/moonshine/pnpm-lock.yaml
generated
687
wp-content/themes/moonshine/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -2,15 +2,15 @@ import type { H3Event } from "h3";
|
||||
import { GraphQLClient } from "graphql-request";
|
||||
import { jwtDecode } from "jwt-decode";
|
||||
import type { User } from "#auth-utils";
|
||||
import type { AuthUserFragment } from "#graphql/fragments";
|
||||
import { AuthRefreshTokenDocument, type AuthLoginResult } from "#graphql/operations";
|
||||
import type { AuthUserFragment, AuthLoginMutationResult } from "#graphql/operations";
|
||||
import { AuthRefreshTokenDocument } from "#graphql/operations";
|
||||
|
||||
// Handle login result and store user session
|
||||
export async function handleLogin(event: H3Event, loginData: AuthLoginResult) {
|
||||
if (!loginData?.login) {
|
||||
export async function handleLogin(event: H3Event, loginResult: AuthLoginMutationResult) {
|
||||
if (!loginResult?.login) {
|
||||
return false;
|
||||
}
|
||||
const { user, authToken, refreshToken } = loginData.login;
|
||||
const { user, authToken, refreshToken } = loginResult.login;
|
||||
if (!user || !authToken || !refreshToken) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Helper: Extracts nodes from a GraphQL connection object, returning an empty array if nodes are absent.
|
||||
export function extractNodes<T>(connection: { nodes?: T[] } | null | undefined): T[] {
|
||||
return connection?.nodes || [] as T[];
|
||||
export function extractNodes<T>(connection: { nodes?: readonly T[] } | null | undefined): readonly T[] {
|
||||
return connection?.nodes ?? [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user