2024-07-08 22:43:50 +02:00
|
|
|
<script lang="ts">
|
|
|
|
import { page } from '$app/stores';
|
2024-07-09 17:49:18 +02:00
|
|
|
import { getNextGuide, getPreviousGuide } from '$lib/components/docs/docs';
|
2024-07-08 22:43:50 +02:00
|
|
|
import DocsLoader from '$lib/components/docs/DocsLoader.svelte';
|
2024-07-09 17:49:18 +02:00
|
|
|
import { Button } from '$lib/components/ui/button';
|
|
|
|
import { getURLForLanguage } from '$lib/utils';
|
|
|
|
import { ChevronLeft, ChevronRight } from 'lucide-svelte';
|
|
|
|
|
|
|
|
$: previousGuide = getPreviousGuide($page.params.guide);
|
|
|
|
$: nextGuide = getNextGuide($page.params.guide);
|
2024-07-08 22:43:50 +02:00
|
|
|
</script>
|
|
|
|
|
2024-07-09 17:49:18 +02:00
|
|
|
<DocsLoader path="{$page.params.guide}.mdx" />
|
|
|
|
|
|
|
|
<div class="flex flex-row pt-6">
|
|
|
|
{#if previousGuide}
|
|
|
|
<Button
|
|
|
|
variant="outline"
|
|
|
|
class="mr-auto"
|
|
|
|
href={getURLForLanguage(undefined, `/help/${previousGuide}`)}
|
|
|
|
>
|
|
|
|
<ChevronLeft size="14" class="mr-1 mt-0.5" />
|
|
|
|
<DocsLoader path="{previousGuide}.mdx" titleOnly={true} />
|
|
|
|
</Button>
|
|
|
|
{/if}
|
|
|
|
{#if nextGuide}
|
|
|
|
<Button
|
|
|
|
variant="outline"
|
|
|
|
class="ml-auto"
|
|
|
|
href={getURLForLanguage(undefined, `/help/${nextGuide}`)}
|
|
|
|
>
|
|
|
|
<DocsLoader path="{nextGuide}.mdx" titleOnly={true} />
|
|
|
|
<ChevronRight size="14" class="ml-1 mt-0.5" />
|
|
|
|
</Button>
|
|
|
|
{/if}
|
|
|
|
</div>
|