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

feat: adds landing page scaffolding #641

Merged
Prev Previous commit
Next Next commit
fix: properly use key on landing leaderboard
Eein committed Nov 2, 2024

Verified

This commit was signed with the committer’s verified signature.
Eein William Volin
commit c81d36701debff763319f2336dd4390a2fd81c0a
37 changes: 19 additions & 18 deletions components/blocks/Landing/Landing.vue
Original file line number Diff line number Diff line change
@@ -4,27 +4,28 @@ import LandingAbout from './LandingAbout.vue'
// TODO: Get api leaderboard lists
const leaderboards: Leaderboard[] = [
{ name: 'Getting Over It With Bennet Foddy' },
{ name: 'Getting Over It With Bennet Foddy' },
{ name: 'Getting Over It With Bennet Foddy' },
{ name: 'Thing' },
{ name: 'Getting Over It With Bennet Foddy' },
{ name: 'Getting Over It With Bennet Foddy' },
{ name: 'Getting Over It With Bennet Foddy' },
{ name: 'Okay Game' },
{ name: 'Getting Over It With Bennet Foddy' },
{ name: 'Getting Over It With Bennet Foddy' },
{ name: 'Getting Over It With Bennet Foddy' },
{ name: 'SHORT NAME' },
{ id: 1, name: 'Getting Over It With Bennet Foddy' },
{ id: 2, name: 'Getting Over It With Bennet Foddy' },
{ id: 3, name: 'Getting Over It With Bennet Foddy' },
{ id: 4, name: 'Thing' },
{ id: 5, name: 'Getting Over It With Bennet Foddy' },
{ id: 6, name: 'Getting Over It With Bennet Foddy' },
{ id: 7, name: 'Getting Over It With Bennet Foddy' },
{ id: 8, name: 'Okay Game' },
{ id: 9, name: 'Getting Over It With Bennet Foddy' },
{ id: 10, name: 'Getting Over It With Bennet Foddy' },
{ id: 11, name: 'Getting Over It With Bennet Foddy' },
{ id: 12, name: 'SHORT NAME' },
{
id: 13,
name: 'WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW',
},
{ name: 'Getting Over It With Bennet Foddy' },
{ name: 'Getting Over It With Bennet Foddy' },
{ name: 'Getting Over It With Bennet Foddy' },
{ name: 'Getting Over It With Bennet Foddy' },
{ name: 'Getting Over It With Bennet Foddy' },
{ name: 'Getting Over It With Bennet Foddy' },
{ id: 14, name: 'Getting Over It With Bennet Foddy' },
{ id: 15, name: 'Getting Over It With Bennet Foddy' },
{ id: 16, name: 'Getting Over It With Bennet Foddy' },
{ id: 17, name: 'Getting Over It With Bennet Foddy' },
{ id: 18, name: 'Getting Over It With Bennet Foddy' },
{ id: 19, name: 'Getting Over It With Bennet Foddy' },
]
</script>

6 changes: 3 additions & 3 deletions components/blocks/Landing/LandingLeaderboards.test.ts
Original file line number Diff line number Diff line change
@@ -3,9 +3,9 @@ import Landing from './LandingLeaderboards.vue'

describe('LandingLeaderboards Component', () => {
const leaderboards = [
{ name: 'Getting Over It With Bennet Foddy' },
{ name: 'Getting Over It With Bennet Foddy' },
{ name: 'Getting Over It With Bennet Foddy' },
{ id: 1, name: 'Getting Over It With Bennet Foddy' },
{ id: 2, name: 'Getting Over It With Bennet Foddy' },
{ id: 3, name: 'Getting Over It With Bennet Foddy' },
]

it('should render without crashing', async () => {
2 changes: 1 addition & 1 deletion components/blocks/Landing/LandingLeaderboards.vue
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ defineProps<LandingLeaderboardsProps>()
>
<div
v-for="leaderboard in leaderboards"
:key="leaderboard"
:key="leaderboard.id"
class="mb-2 content-center bg-gray-200 px-4 py-2"
>
<span class="break-words">
1 change: 1 addition & 0 deletions components/types/shared.d.ts
Original file line number Diff line number Diff line change
@@ -5,5 +5,6 @@ interface Socials {
}

interface Leaderboard {
id: number
name: string
}