Add proper button for splash page
This commit is contained in:
15
src/app/components/UploadButton.tsx
Normal file
15
src/app/components/UploadButton.tsx
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import { faUpload } from '@fortawesome/free-solid-svg-icons'
|
||||||
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||||
|
import Link from 'next/link'
|
||||||
|
|
||||||
|
export function UploadButton ({ href }: { href: string }) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className='relative'>
|
||||||
|
<Link href={href} className='top-button absolute -top-4 right-8'>
|
||||||
|
<FontAwesomeIcon icon={faUpload} />
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import { BackButton } from '@/app/components/BackButton'
|
import { BackButton } from '@/app/components/BackButton'
|
||||||
import { ReloadButton } from '@/app/components/ReloadButton'
|
import { ReloadButton } from '@/app/components/ReloadButton'
|
||||||
|
import { UploadButton } from '@/app/components/UploadButton'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
@@ -26,24 +27,16 @@ export default function BerryDashSplash () {
|
|||||||
return (
|
return (
|
||||||
<div className='box'>
|
<div className='box'>
|
||||||
<BackButton href='/game/berry-dash' />
|
<BackButton href='/game/berry-dash' />
|
||||||
|
<UploadButton href='/game/berry-dash/splash/submit' />
|
||||||
<ReloadButton
|
<ReloadButton
|
||||||
action={() => {
|
action={() => {
|
||||||
setResponse(null)
|
setResponse(null)
|
||||||
Refresh()
|
Refresh()
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<p className='px-8 mb-2 -mt-2 text-center text-2xl'>
|
<p className='px-20 mb-2 -mt-2 text-center text-2xl'>
|
||||||
Berry Dash Splash Texts
|
Berry Dash Splash Texts
|
||||||
</p>
|
</p>
|
||||||
<div className='flex justify-center'>
|
|
||||||
<Link
|
|
||||||
href='/game/berry-dash/splash/submit'
|
|
||||||
draggable={false}
|
|
||||||
className='button'
|
|
||||||
>
|
|
||||||
Want to submit a splash text?
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
<p className='sub-box -mx-4 -mb-4 mt-2 text-center text-sm whitespace-pre-line select-text'>
|
<p className='sub-box -mx-4 -mb-4 mt-2 text-center text-sm whitespace-pre-line select-text'>
|
||||||
{response == null
|
{response == null
|
||||||
? 'Loading...'
|
? 'Loading...'
|
||||||
|
|||||||
Reference in New Issue
Block a user