Skip to content

Commit a8176e8

Browse files
committed
merge conflict
1 parent 29ebc0a commit a8176e8

4 files changed

Lines changed: 20 additions & 14 deletions

File tree

platforms/metagram/src/lib/fragments/Header/Header.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
4646
const classes = $derived({
4747
common: cn(
48-
'flex items-center justify-between my-4 pb-4 border-b-[1px] md:border-0 border-grey px-4'
48+
'flex items-center justify-between my-4 pb-6 border-b-[1px] md:border-0 border-grey'
4949
),
5050
text: variantClasses[variant].text,
5151
background: variantClasses[variant].background

platforms/metagram/src/routes/(protected)/+layout.svelte

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,29 @@
99
let route = $derived(page.url.pathname);
1010
let heading = $state('');
1111
12-
const routeToHeading: Record<string, string> = {
13-
'/home': 'Feed',
14-
'/discover': 'Search',
15-
'/post': 'Post',
16-
'/messages': 'Messages',
17-
'/settings': 'Settings',
18-
'/profile': 'Profile'
19-
};
20-
2112
$effect(() => {
22-
heading = routeToHeading[route] ?? heading;
13+
if (route.includes('home')) {
14+
heading = 'Feed';
15+
} else if (route.includes('discover')) {
16+
heading = 'Search';
17+
} else if (route.includes('post')) {
18+
heading = 'Post';
19+
} else if (route.includes('messages')) {
20+
heading = 'Messages';
21+
} else if (route.includes('settings')) {
22+
heading = 'Settings';
23+
} else if (route.includes('profile')) {
24+
heading = 'Profile';
25+
} else {
26+
heading = '';
27+
}
2328
});
2429
</script>
2530

2631
<main class="block h-[100dvh] grid-cols-[20vw_auto_30vw] md:grid">
2732
<SideBar profileSrc="https://picsum.photos/200" handlePost={async () => alert('adas')} />
28-
<section class="mx-4 md:mx-8 md:pt-10">
33+
34+
<section class="mx-4 md:mx-8 md:pt-8">
2935
<div class="flex justify-between">
3036
<Header variant="primary" {heading} />
3137
{#if route === '/profile'}

platforms/metagram/src/routes/(protected)/home/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
});
5959
</script>
6060

61-
<ul bind:this={listElement} class="hide-scrollbar h-[600px] overflow-auto">
61+
<ul bind:this={listElement} class="hide-scrollbar overflow-auto">
6262
{#each visiblePosts as post}
6363
<li class="mb-6">
6464
<Post

platforms/metagram/src/routes/(protected)/settings/+layout.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
let { children } = $props();
33
</script>
44

5-
<div class="flex flex-col gap-5 px-5">
5+
<div class="flex flex-col gap-5">
66
{@render children()}
77
</div>

0 commit comments

Comments
 (0)