Skip to content

Commit

Permalink
細かな修正
Browse files Browse the repository at this point in the history
  • Loading branch information
nasubi-dev committed Sep 6, 2024
1 parent 5be2a59 commit 4dea72f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 122 deletions.
33 changes: 6 additions & 27 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { Icon } from "@iconify/react";
import { useStore } from "@nanostores/react";
import {
Avatar,
Flex,
Text,
Link as LinkComponent,
Box,
} from "@radix-ui/themes";
import { Flex, Text, Link as LinkComponent, Box } from "@radix-ui/themes";
import { type ReactElement } from "react";
import styled from "styled-components";
import LogoIcon from "@/assets/EsaChibuIcon.svg";
Expand Down Expand Up @@ -169,16 +164,11 @@ export function Header(): ReactElement {
className="createStyle createHoverAnime headerDefaultStyle"
to="/unlocked"
>
<Flex align="center" gap="4">
<Flex align="center" gap="4" style={{ color: "white" }}>
<Text size="2" weight="bold">
実績管理
</Text>
<Avatar
fallback="A"
radius="full"
size="3"
src="https://api.iconify.design/mdi:lock-open-outline.svg"
/>
<Icon height="2em" icon="mdi:lock-open-outline" />
</Flex>
</UnlockedStyle>
) : (
Expand All @@ -191,24 +181,13 @@ export function Header(): ReactElement {
<Text size="3" weight="bold">
ログイン
</Text>
<Avatar
fallback="T"
radius="full"
size="2"
src="https://api.iconify.design/mdi:account.svg"
/>
<Icon height="2em" icon="mdi:account" />
</Flex>
</LoginStyle>
</LinkComponent>
)}
<TeamStyle to="/">
<Avatar
fallback="T"
radius="full"
size="3"
src="https://api.iconify.design/mdi:account-group.svg"
style={{ width: "60px", padding: "0.5rem" }}
/>
<Icon height="2em" icon="mdi:account-group" width="4em" />
</TeamStyle>
</RightContents>
</HeaderStyle>
Expand Down
8 changes: 3 additions & 5 deletions src/components/member/Info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,19 @@ export function Info({
name,
ranking,
point,
icon,
rateOfUnlocked,
}: {
name: string;
ranking: number;
point: number;
icon: string;
rateOfUnlocked: number;
}): ReactElement {
return (
<InfoBox direction="column">
<Flex align="center" direction="column">
<Avatar
fallback="T"
size="9"
src="https://images.unsplash.com/photo-1607346256330-dee7af15f7c5?&w=64&h=64&dpr=2&q=70&crop=focalpoint&fp-x=0.67&fp-y=0.5&fp-z=1.4&fit=crop"
/>
<Avatar fallback="T" size="9" src={icon} />

<Text mt="1rem" size="8" weight="bold">
{name}
Expand Down
10 changes: 8 additions & 2 deletions src/pages/members/[id]/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Flex } from "@radix-ui/themes";
import { Box, Flex, Text } from "@radix-ui/themes";
import { type ReactElement } from "react";
import { useParams } from "react-router-dom";
import styled from "styled-components";
Expand Down Expand Up @@ -47,7 +47,8 @@ export default function Page(): ReactElement {

const thisMemberUnlockedAchievements = unlockedAchievements
.filter((u) => u.memberEmail === m.email)
.map((u) => achievements.find((a) => a.id === u.achievementID));
.map((u) => achievements.find((a) => a.id === u.achievementID))
.reverse();

const rankedMembers = members
.map((l) => ({
Expand All @@ -66,13 +67,18 @@ export default function Page(): ReactElement {
return (
<Flex key={m.email} gap="9">
<Info
icon={m.icon}
name={m.name}
point={point}
ranking={ranking}
rateOfUnlocked={rateOfUnlocked}
/>
<div>
<Box mt="20vh" />
<Text size="8" weight="bold">
最近解除した実績
</Text>
<Box mt="1rem" />
<BoxStyle>
{thisMemberUnlockedAchievements.map((achievement) => {
if (achievement === undefined) return null;
Expand Down
87 changes: 0 additions & 87 deletions src/pages/test/index.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export type Path =
| `/members`
| `/members/:id`
| `/ranking`
| `/test`
| `/unlocked`;

export type Params = {
Expand Down

0 comments on commit 4dea72f

Please sign in to comment.