Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

263-fix: Remove buttons block on the Community page hero #303

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions src/features/home/hero/hero.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,39 +99,6 @@
padding: 0 0 0 24px;
}
}

& > .tags-container {
@include media-tablet {
flex-direction: column;
align-items: flex-start;
padding: 0;
}

@include media-mobile {
padding: 0;
}

display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;

width: max-content;
padding: 0 0 0 24px;

& .tag-container {
@include media-tablet {
margin-top: 16px;
}

display: flex;
align-items: center;
}
}

& .tag-divider {
margin: 0 8px;
}
}

.description-title {
Expand Down
17 changes: 0 additions & 17 deletions src/features/home/hero/hero.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,4 @@ describe('Hero', () => {
const descTitle = screen.getByText('Connecting people, growing together, having fun');
expect(descTitle).toBeVisible();
});

it('renders three tags', () => {
renderWithRouter(<Hero />);
const tags = screen.getAllByRole('link');
expect(tags.length).toBe(3);
});

it('renders the correct tag labels', () => {
renderWithRouter(<Hero />);
const tag1 = screen.getByRole('link', { name: /education/i });
const tag2 = screen.getByRole('link', { name: /events & meetups/i });
const tag3 = screen.getByRole('link', { name: /community building/i });

expect(tag1).toBeInTheDocument();
expect(tag2).toBeInTheDocument();
expect(tag3).toBeInTheDocument();
});
});
24 changes: 0 additions & 24 deletions src/features/home/hero/hero.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
import { TagDivider } from './tag-divider';
import { LinkCustom } from '@/app/components';

import './hero.scss';

interface TagProps {
id: string;
label: string;
}

const tags: TagProps[] = [
{ id: 'school', label: 'education' },
{ id: 'events', label: 'events & meetups' },
{ id: 'community', label: 'community building' },
];

export const Hero = () => {
return (
<main id="main" className="main container">
Expand All @@ -27,16 +13,6 @@ export const Hero = () => {
</div>
</div>
<h2 className="description-title">Connecting people, growing together, having fun</h2>
<div className="tags-container">
{tags.map(({ id, label }, index) => (
<div className="tag-container" key={id}>
<LinkCustom href={`#${id}`} button variant="outlined" rounded>
{label}
</LinkCustom>
{index !== tags?.length - 1 && <TagDivider />}
</div>
))}
</div>
</div>
</main>
);
Expand Down
1 change: 0 additions & 1 deletion src/features/home/hero/tag-divider/index.ts

This file was deleted.

31 changes: 0 additions & 31 deletions src/features/home/hero/tag-divider/tag-divider.scss

This file was deleted.

17 changes: 0 additions & 17 deletions src/features/home/hero/tag-divider/tag-divider.test.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions src/features/home/hero/tag-divider/tag-divider.tsx

This file was deleted.

Loading