mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2025-01-04 15:53:30 +03:00
fix: remove unused imports and update conditional rendering in PullRequestPage component
This commit is contained in:
parent
94ff6cb3b9
commit
1882b8e736
@ -1,21 +1,18 @@
|
||||
<script lang="ts">
|
||||
import type { PageData } from './$types';
|
||||
import { page } from '$app/stores';
|
||||
import ProjectHeader from '../../ProjectHeader.svelte';
|
||||
import PullRequestPreview from './PullRequestPreview.svelte';
|
||||
|
||||
export let data: PageData;
|
||||
let { branchController, pullRequestsState, pullRequestsStore } = data;
|
||||
let { branchController, pullRequestsStore } = data;
|
||||
|
||||
$: pr = $pullRequestsStore?.find((b) => b.number.toString() == $page.params.number);
|
||||
</script>
|
||||
|
||||
<div class="bg-color-3 flex h-full flex-grow flex-col overflow-y-auto overscroll-none">
|
||||
<div class="flex-grow px-8">
|
||||
{#if $pullRequestsState?.isLoading}
|
||||
{#if !$pullRequestsStore}
|
||||
<p>Loading...</p>
|
||||
{:else if $pullRequestsState?.isError}
|
||||
<p>Error...</p>
|
||||
{:else if pr}
|
||||
<PullRequestPreview {branchController} pullrequest={pr} />
|
||||
{:else}
|
||||
|
Loading…
Reference in New Issue
Block a user