-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor mirror edit route, add edit page
- Loading branch information
1 parent
d1a62a7
commit dd43516
Showing
6 changed files
with
68 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use client'; | ||
import { Icon } from '@/lib/Icon'; | ||
import { Label } from '@/lib/Label'; | ||
import { useRouter } from 'next/navigation'; | ||
|
||
const EditButton = ({ toLink }: { toLink: string }) => { | ||
const router = useRouter(); | ||
return ( | ||
<button | ||
className='IconButton' | ||
onClick={() => router.push(toLink)} | ||
aria-label='sort up' | ||
style={{ | ||
display: 'flex', | ||
marginLeft: '1rem', | ||
alignItems: 'center', | ||
backgroundColor: 'whitesmoke', | ||
border: '1px solid rgba(0,0,0,0.1)', | ||
borderRadius: '0.5rem', | ||
}} | ||
> | ||
<Label>Edit Mirror</Label> | ||
<Icon name='edit' /> | ||
</button> | ||
); | ||
}; | ||
|
||
export default EditButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters