This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script setup lang="ts"> | |
const deleteAccount = async () => { | |
try { | |
const data = await $fetch<{ success: boolean; message: string }>( | |
"/api/user/delete", | |
{ | |
method: "DELETE", | |
} | |
); | |
await useSupabaseClient().auth.signOut(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- invoice --> | |
<html> | |
<head> | |
<link href='https://my.sevdesk.de/assets/fonts/OpenSans.css' rel='stylesheet' type='text/css'> | |
<style> | |
@font-face { | |
font-family: 'ocrb'; | |
src: url('https://my.sevdesk.de/assets/fonts/OcrB/ocrb.ttf'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// composables/useTypedFetch.ts | |
import type { UseFetchOptions } from 'nuxt/app' | |
import type { InternalApi } from 'nitropack' | |
import type { ApiRoutes, ApiResponse } from './apiResponse' | |
export const useTypedFetch = <T extends ApiRoutes, M extends keyof InternalApi[T]>( | |
route: T, | |
method: M, | |
opts?: Omit<UseFetchOptions<ApiResponse<T, M>>, 'method'> | |
) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script setup lang="ts"> | |
const { | |
coursesEn, | |
coursesDe, | |
isLoading, | |
learndashEn | |
} = useLearndashCache() | |
// Example of using SWR pattern for a specific course | |
const useCourse = async (id: string) => { |