mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-28 20:52:00 +08:00
[questions][ui] Minor UI cleanup (#470)
* [questions][ui] fix no more questions overlap * [questions][ui] remove redundent horizontal div * [questions][ui] reduce gap
This commit is contained in:
@ -35,13 +35,7 @@ export default function ContributeQuestionDialog({
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Transition.Root as={Fragment} show={show}>
|
<Transition.Root as={Fragment} show={show}>
|
||||||
<Dialog
|
<Dialog as="div" className="relative z-10" onClose={onCancel}>
|
||||||
as="div"
|
|
||||||
className="relative z-10"
|
|
||||||
onClose={() => {
|
|
||||||
// Todo: save state
|
|
||||||
onCancel();
|
|
||||||
}}>
|
|
||||||
<Transition.Child
|
<Transition.Child
|
||||||
as={Fragment}
|
as={Fragment}
|
||||||
enter="ease-out duration-300"
|
enter="ease-out duration-300"
|
||||||
|
@ -115,7 +115,6 @@ export default function ContributeQuestionForm({
|
|||||||
rows={5}
|
rows={5}
|
||||||
{...register('questionContent')}
|
{...register('questionContent')}
|
||||||
/>
|
/>
|
||||||
<HorizontalDivider />
|
|
||||||
<h2 className="text-md text-primary-800 font-semibold">
|
<h2 className="text-md text-primary-800 font-semibold">
|
||||||
Additional information
|
Additional information
|
||||||
</h2>
|
</h2>
|
||||||
|
@ -486,7 +486,7 @@ export default function QuestionsBrowsePage() {
|
|||||||
<main className="flex flex-1 flex-col items-stretch">
|
<main className="flex flex-1 flex-col items-stretch">
|
||||||
<div className="flex h-full flex-1">
|
<div className="flex h-full flex-1">
|
||||||
<section className="flex min-h-0 flex-1 flex-col items-center overflow-auto">
|
<section className="flex min-h-0 flex-1 flex-col items-center overflow-auto">
|
||||||
<div className="m-4 flex max-w-3xl flex-1 flex-col items-stretch justify-start gap-8">
|
<div className="m-4 flex max-w-3xl flex-1 flex-col items-stretch justify-start gap-6">
|
||||||
<ContributeQuestionCard
|
<ContributeQuestionCard
|
||||||
onSubmit={(data) => {
|
onSubmit={(data) => {
|
||||||
const { cityId, countryId, stateId } = data.location;
|
const { cityId, countryId, stateId } = data.location;
|
||||||
@ -502,6 +502,7 @@ export default function QuestionsBrowsePage() {
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
<div className="flex flex-col items-stretch gap-4">
|
||||||
<div className="sticky top-0 border-b border-slate-300 bg-slate-50 py-4">
|
<div className="sticky top-0 border-b border-slate-300 bg-slate-50 py-4">
|
||||||
<QuestionSearchBar
|
<QuestionSearchBar
|
||||||
sortOrderValue={sortOrder}
|
sortOrderValue={sortOrder}
|
||||||
@ -548,7 +549,9 @@ export default function QuestionsBrowsePage() {
|
|||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
)}
|
)}
|
||||||
|
{questionCount !== 0 && (
|
||||||
<PaginationLoadMoreButton query={questionsInfiniteQuery} />
|
<PaginationLoadMoreButton query={questionsInfiniteQuery} />
|
||||||
|
)}
|
||||||
{questionCount === 0 && (
|
{questionCount === 0 && (
|
||||||
<div className="flex w-full items-center justify-center gap-2 rounded-md border border-slate-300 bg-slate-200 p-4 text-slate-600">
|
<div className="flex w-full items-center justify-center gap-2 rounded-md border border-slate-300 bg-slate-200 p-4 text-slate-600">
|
||||||
<NoSymbolIcon className="h-6 w-6" />
|
<NoSymbolIcon className="h-6 w-6" />
|
||||||
@ -558,6 +561,7 @@ export default function QuestionsBrowsePage() {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<aside className="hidden w-[300px] overflow-y-auto border-l bg-white py-4 lg:block">
|
<aside className="hidden w-[300px] overflow-y-auto border-l bg-white py-4 lg:block">
|
||||||
<h2 className="px-4 text-xl font-semibold">Filter by</h2>
|
<h2 className="px-4 text-xl font-semibold">Filter by</h2>
|
||||||
|
Reference in New Issue
Block a user