chore: submission list router rename to submission
This commit is contained in:
parent
2816c9fbee
commit
1c69063825
10
src/components/Title.tsx
Normal file
10
src/components/Title.tsx
Normal file
@ -0,0 +1,10 @@
|
||||
import { Center, Text } from "@chakra-ui/react";
|
||||
|
||||
export default function Title(props: { word: string; center?: boolean }) {
|
||||
const b = (
|
||||
<Text as="b" fontSize="lg">
|
||||
{props.word}
|
||||
</Text>
|
||||
);
|
||||
return props.center ? <Center>{b}</Center> : b;
|
||||
}
|
@ -30,9 +30,9 @@ export default function ProblemDetailPage() {
|
||||
variant="outline"
|
||||
size="sm"
|
||||
leftIcon={<MdSearch />}
|
||||
onClick={() => navigate(`/problem/${id}/status`)}
|
||||
onClick={() => navigate(`/problem/${id}/submission`)}
|
||||
>
|
||||
Status
|
||||
Submissions
|
||||
</Button>
|
||||
</WrapItem>
|
||||
</Wrap>
|
||||
|
@ -1,28 +1,13 @@
|
||||
import { useState } from "react";
|
||||
import type { ColumnDef, PaginationState } from "@tanstack/react-table";
|
||||
import {
|
||||
Badge,
|
||||
Button,
|
||||
Input,
|
||||
InputGroup,
|
||||
InputLeftElement,
|
||||
Link,
|
||||
Stack,
|
||||
Text,
|
||||
useColorModeValue,
|
||||
} from "@chakra-ui/react";
|
||||
import { Badge, Button, Input, InputGroup, InputLeftElement, Link, Stack, useColorModeValue } from "@chakra-ui/react";
|
||||
import { LinkIcon, SearchIcon } from "@chakra-ui/icons";
|
||||
import { Link as ReactRouterLink } from "react-router-dom";
|
||||
|
||||
import type { ProblemInfo } from "../app/services/problem";
|
||||
import { useSearchQuery } from "../app/services/problem";
|
||||
import Table from "../components/Table";
|
||||
|
||||
const Title = (props: { word: string }) => (
|
||||
<Text as="b" fontSize="lg">
|
||||
{props.word}{" "}
|
||||
</Text>
|
||||
);
|
||||
import Title from "../components/Title";
|
||||
|
||||
const columns: ColumnDef<ProblemInfo>[] = [
|
||||
{
|
||||
|
@ -26,7 +26,7 @@ export default function SubmitPage() {
|
||||
|
||||
useEffect(() => {
|
||||
if (result.isSuccess) {
|
||||
navigate(`/problem/${id}/status`);
|
||||
navigate(`/problem/${id}/submission`);
|
||||
} else if (result.isError) {
|
||||
toast({
|
||||
status: "error",
|
||||
|
Loading…
Reference in New Issue
Block a user