mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-30 05:34:33 +08:00

* [questions][ui] Add DiscardDraftModal * [questions][ui] add question draft dialog form * [questions][ui] refactor bottom contribute bar * [questions][ui] landing page * [questions][ui] add similar question card * [questions][ui] use TIH dialog for discard * [questions][ui] add aria-hidden for select label * [questions][ui] extract useFormRegister hook * [questions][ui] change landing page to component * [questions][ui] load filter from query param * [question][chore] add constants.ts * [questions][ui] add app logo * [questions][ui] remove form * [questions][ui] fix dialog closing * [questions][chore] minor changes * [questions][ui] radio button * [questions][ui] add vertical scrolling * [questions][ui] Question age url param change * [questions][chore] refactor and add in todo * [questions][ui] contribute card clickable * [questions][ui] landing page github stars * [questions][ui] edit css for question card * [question][ui] add question detail page * [questions][ui] remove navbar import * [questions][ui] css changes * [questions][ui] hide sidebar * [questions][ui] contribute questions form ui * [questions][ui] question page * [questions][bug] remove button * [questions][ui] voting button size * [questions][chore] add dummy data, refactor * [questions][ui] answer card * [questions][chore] add sample data * [questions][ui] add hover * [questions][ui] clean up old href * [questions][ui] add comments & commments page * [question][feat] cache filter options to localStorage * [questions][fix] fix index refreshing constantly * [questions][ui] set fixed sample date Co-authored-by: Jeff Sieu <jeffsy00@gmail.com>
32 lines
777 B
TypeScript
32 lines
777 B
TypeScript
import withHref from '~/utils/questions/withHref';
|
|
|
|
import type { QuestionCardProps } from './QuestionCard';
|
|
import QuestionCard from './QuestionCard';
|
|
|
|
export type QuestionOverviewCardProps = Omit<
|
|
QuestionCardProps & {
|
|
showActionButton: false;
|
|
showUserStatistics: true;
|
|
showVoteButtons: true;
|
|
},
|
|
| 'actionButtonLabel'
|
|
| 'onActionButtonClick'
|
|
| 'showActionButton'
|
|
| 'showUserStatistics'
|
|
| 'showVoteButtons'
|
|
>;
|
|
|
|
function QuestionOverviewCardWithoutHref(props: QuestionOverviewCardProps) {
|
|
return (
|
|
<QuestionCard
|
|
{...props}
|
|
showActionButton={false}
|
|
showUserStatistics={true}
|
|
showVoteButtons={true}
|
|
/>
|
|
);
|
|
}
|
|
|
|
const QuestionOverviewCard = withHref(QuestionOverviewCardWithoutHref);
|
|
export default QuestionOverviewCard;
|