<script lang="ts">
	import CodeSearchTab from "$lib/components/search/tabs/CodeSearchTab.svelte";
	import RepoSearchTab from "$lib/components/search/tabs/RepoSearchTab.svelte";
	import type { PageData } from "./$types";

	let { data }: { data: PageData } = $props();
</script>

{#if data.type === "code"}
	<CodeSearchTab query={data.query} />
{:else}
	<RepoSearchTab query={data.query} />
{/if}
