Skip to content

Commit

Permalink
Remove text from back button
Browse files Browse the repository at this point in the history
  • Loading branch information
mrushkova committed Apr 25, 2024
1 parent 45df029 commit 1a92953
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/frontend/src/components/bids/allBids/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const Header = () => {

return (
<StyledHeader>
<BackButton url="/" withBack />
<BackButton url="/" />
<Wrapper>
<Title>
<h2>Number of participants:</h2>
Expand Down
10 changes: 4 additions & 6 deletions packages/frontend/src/components/buttons/BackButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ interface BackButtonProps {
setView?: (view: number) => void
url?: string
resetState?: () => void
withBack?: boolean
}

export function BackButton({ view, setView, url, resetState, withBack = false }: BackButtonProps) {
export function BackButton({ view, setView, url, resetState }: BackButtonProps) {
const router = useRouter()

const goBack = useCallback(() => {
Expand All @@ -28,17 +27,16 @@ export function BackButton({ view, setView, url, resetState, withBack = false }:
}, [setView, view, router, url, resetState])

return (
<BackBtn onClick={goBack} $withBack={withBack}>
<BackBtn onClick={goBack}>
<ArrowLeftIcon color={Colors.Black} />
{withBack && 'Back'}
</BackBtn>
)
}

const BackBtn = styled.button<{ $withBack?: boolean }>`
const BackBtn = styled.button`
display: flex;
align-items: center;
width: ${({ $withBack }) => ($withBack ? '84px' : '35px')};
width: 35px;
height: 32px;
font-family: 'Roboto', Helvetica, Arial, sans-serif;
font-weight: 400;
Expand Down

0 comments on commit 1a92953

Please sign in to comment.