Skip to content

Commit

Permalink
Feat: 조건 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
cjy3458 committed Mar 11, 2024
1 parent 1b9c8e9 commit 2a36ac6
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/components/mypage/component/ScoreHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
import { BackgroundColor, Primary } from '@utils/constant/color';
import React from 'react';
import React, { useState } from 'react';
import styled from 'styled-components';
import MakeAttendanceButton from './MakeAttendanceButton';

const ScoreHeader = ({ isAdmin, name }: { isAdmin: boolean; name: string }) => {
interface UserProps {
isAdmin: boolean;
name: string;
}

const ScoreHeader = ({ isAdmin, name }: UserProps) => {
const [isPre, setIsPre] = useState<boolean>(false);
if (name === '최재영' || name === '박재윤') {
setIsPre(true);
}

return (
<>
<TitleHeader>
<TitleText>출석현황</TitleText>
{isAdmin && (name === '최재영' || name === '박재윤') && <MakeAttendanceButton />}
{isPre && <MakeAttendanceButton />}
</TitleHeader>

<CallOut>
Expand Down

0 comments on commit 2a36ac6

Please sign in to comment.