Merge pull request #388 from koreanbots/master

Bugs fixed, improved some
This commit is contained in:
Junseo Park 2021-05-29 02:46:22 +09:00 committed by GitHub
commit 7c99da2969
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 5 deletions

View File

@ -2,7 +2,7 @@
## Korean ## Korean
[버그 바운티 프로그램](https://beta.koreanbots.dev/security) [버그 바운티 프로그램](https://koreanbots.dev/security)
## English ## English

View File

@ -84,7 +84,7 @@ const BotCard: React.FC<BotCardProps> = ({ manage = false, bot }) => {
</a> </a>
</Link> </Link>
{manage ? ( {manage ? (
<Link href={`/bots${bot.id}/edit`}> <Link href={`/bots/${bot.id}/edit`}>
<a className='py-3 w-full text-center text-green-500 hover:text-white text-sm font-bold hover:bg-green-500 rounded-br-2xl hover:shadow-lg transition duration-100 ease-in'> <a className='py-3 w-full text-center text-green-500 hover:text-white text-sm font-bold hover:bg-green-500 rounded-br-2xl hover:shadow-lg transition duration-100 ease-in'>
</a> </a>

View File

@ -48,7 +48,7 @@ const TextArea: React.FC<TextAreaProps> = ({ name, placeholder, theme='auto', ma
<div className='emoji-selector-button outline-none' onClick={() => setEmojiPickerHidden(false)} onKeyPress={() => setEmojiPickerHidden(false)} role='button' tabIndex={0} /> <div className='emoji-selector-button outline-none' onClick={() => setEmojiPickerHidden(false)} onKeyPress={() => setEmojiPickerHidden(false)} role='button' tabIndex={0} />
</div> </div>
{ {
max && <span className={`absolute bottom-2 right-4${max < value.length ? ' text-red-400' : ''}`}> max && <span className={`absolute bottom-2 right-4 ${max < value.length ? ' text-red-400' : ''}`}>
{max-value.length} {max-value.length}
</span> </span>
} }

View File

@ -81,6 +81,7 @@ const Search: React.FC = () => {
className='relative z-10 flex mt-5 w-full text-black dark:text-gray-100 dark:bg-very-black bg-white rounded-lg' className='relative z-10 flex mt-5 w-full text-black dark:text-gray-100 dark:bg-very-black bg-white rounded-lg'
> >
<input <input
type='search'
maxLength={50} maxLength={50}
className='flex-grow pr-20 px-7 py-3 h-16 text-xl bg-transparent border-0 border-none outline-none shadow' className='flex-grow pr-20 px-7 py-3 h-16 text-xl bg-transparent border-0 border-none outline-none shadow'
placeholder='검색...' placeholder='검색...'

View File

@ -39,6 +39,7 @@ const Search:NextPage<SearchProps> = ({ data, query }) => {
} }
export const getServerSideProps = async(ctx: Context) => { export const getServerSideProps = async(ctx: Context) => {
if(ctx.query.query && !ctx.query.q) ctx.query.q = ctx.query.query
if(!ctx.query?.q) { if(!ctx.query?.q) {
ctx.res.statusCode = 301 ctx.res.statusCode = 301
ctx.res.setHeader('Location', '/') ctx.res.setHeader('Location', '/')
@ -69,7 +70,8 @@ interface Context extends NextPageContext {
} }
interface URLQuery extends ParsedUrlQuery { interface URLQuery extends ParsedUrlQuery {
q: string q?: string
query?: string
page?: string page?: string
} }

View File

@ -1 +1,2 @@
User-agent: * User-agent: *
Allow: /