Skip to content

Commit

Permalink
시니또 메인페이지 이름 부분 기능 수정 (#170)
Browse files Browse the repository at this point in the history
시니또 메인페이지 이름 부분 기능 수정
  • Loading branch information
Dobbymin authored Nov 8, 2024
2 parents d4ea5d8 + aae516b commit 54f1d5a
Showing 1 changed file with 17 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
import { useSinittoInfo } from '@/shared';
import { Flex, Text } from '@chakra-ui/react';
import { useGetSinittoInfo } from '../../../api';
import { Flex, Text, Spinner } from '@chakra-ui/react';

export const SinittoName = () => {
const { data } = useSinittoInfo();
const { data, isLoading } = useGetSinittoInfo();

return (
<Flex w='100%' alignItems='center' mt={10}>
<Text color='var(--color-primary)' fontSize='24px' fontWeight='700'>
{data?.name}
</Text>
<Text fontSize='lg' fontWeight='700'>
님 안녕하세요!
</Text>
{isLoading ? (
<Flex w='100%' justifyContent='left'>
<Spinner color='var(--color-primary)' size='md' />
</Flex>
) : (
<>
<Text color='var(--color-primary)' fontSize='24px' fontWeight='700'>
{data?.name}
</Text>
<Text fontSize='lg' fontWeight='700'>
님 안녕하세요!
</Text>
</>
)}
</Flex>
);
};

0 comments on commit 54f1d5a

Please sign in to comment.