Skip to content

Commit f908a23

Browse files
authored
Merge pull request #11144 from gitbutlerapp/web-review
Web: Close down the dashboard
2 parents 7ab5b44 + 6e2ce97 commit f908a23

File tree

2 files changed

+1
-30
lines changed

2 files changed

+1
-30
lines changed

apps/web/src/routes/(app)/+page.svelte

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,16 @@
11
<script lang="ts">
2-
import { goto } from '$app/navigation';
32
import RedirectToProfileIfLoggedIn from '$lib/auth/RedirectToProfileIfLoggedIn.svelte';
4-
import DashboardLayout from '$lib/components/dashboard/DashboardLayout.svelte';
53
import { USER_SERVICE } from '$lib/user/userService';
64
import { inject } from '@gitbutler/core/context';
7-
import { isFound } from '@gitbutler/shared/network/loadable';
8-
import { getRecentlyPushedProjects } from '@gitbutler/shared/organizations/projectsPreview.svelte';
9-
import { WEB_ROUTES_SERVICE } from '@gitbutler/shared/routing/webRoutes.svelte';
105
11-
const routes = inject(WEB_ROUTES_SERVICE);
126
const userService = inject(USER_SERVICE);
137
const user = userService.user;
148
159
const loggedIn = $derived($user !== undefined);
16-
const recentProjects = getRecentlyPushedProjects();
17-
let hasRecentProjects = $state(false);
18-
19-
$effect(() => {
20-
if (recentProjects.current.length >= 1) {
21-
const project = recentProjects.current[0];
22-
hasRecentProjects = true;
23-
if (isFound(project)) {
24-
goto(
25-
routes.projectReviewUrl({
26-
ownerSlug: project.value.owner,
27-
projectSlug: project.value.slug
28-
})
29-
);
30-
}
31-
}
32-
});
3310
</script>
3411

3512
{#if !loggedIn}
3613
<p>Loading...</p>
37-
{:else if hasRecentProjects}
38-
<DashboardLayout>
39-
<p>You have no recent projects!</p>
40-
</DashboardLayout>
4114
{:else}
4215
<!-- For now, just redirect the user back to the -->
4316
<RedirectToProfileIfLoggedIn />

apps/web/src/routes/+layout.svelte

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import { provide } from '@gitbutler/core/context';
1414
import { HttpClient, HTTP_CLIENT } from '@gitbutler/shared/network/httpClient';
1515
import { PROJECT_SERVICE, ProjectService } from '@gitbutler/shared/organizations/projectService';
16-
import { getRecentlyPushedProjects } from '@gitbutler/shared/organizations/projectsPreview.svelte';
1716
import { APP_STATE } from '@gitbutler/shared/redux/store.svelte';
1817
import { WebRoutesService, WEB_ROUTES_SERVICE } from '@gitbutler/shared/routing/webRoutes.svelte';
1918
import { type Snippet } from 'svelte';
@@ -63,11 +62,10 @@
6362
6463
// Releases data for changelog
6564
let releases: any[] = $state([]);
66-
const recentProjects = getRecentlyPushedProjects();
6765
6866
// Check if current page should use marketing layout
6967
const isMarketingPage = $derived(
70-
(page.route.id === '/(app)' && recentProjects.current.length === 0) ||
68+
page.route.id === '/(app)' ||
7169
page.route.id === '/(app)/home' ||
7270
page.route.id === '/downloads' ||
7371
page.route.id === '/nightly'

0 commit comments

Comments
 (0)