Skip to content

Commit b58772e

Browse files
authored
✨ Add empty state and instructions to projects (#150)
1 parent ab63fdb commit b58772e

File tree

1 file changed

+53
-3
lines changed

1 file changed

+53
-3
lines changed
Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,66 @@
1-
import { Container, Heading } from "@chakra-ui/react"
1+
import {
2+
Box,
3+
Code,
4+
Container,
5+
Flex,
6+
Heading,
7+
Link,
8+
Text,
9+
VStack,
10+
} from "@chakra-ui/react"
211
import { createFileRoute } from "@tanstack/react-router"
312

413
export const Route = createFileRoute("/_layout/$team/projects")({
514
component: Projects,
615
})
716

817
function Projects() {
18+
// Just to test the UI
19+
const projects = []
20+
921
return (
10-
<Container maxW="full" p={12}>
11-
<Heading size="md" textAlign={{ base: "center", md: "left" }}>
22+
<Container maxW="full" p={12} h="100%">
23+
<Heading size="md" textAlign={{ base: "center", md: "left" }} mb={6}>
1224
Projects
1325
</Heading>
26+
{projects.length > 0 ? (
27+
<></>
28+
) : (
29+
<Flex direction={{ base: "column", md: "row" }}>
30+
<Box w={{ base: "100%", md: "70%" }} mb={{ base: 4, md: 0 }}>
31+
<Text textAlign="center">You don't have any projects yet</Text>
32+
</Box>
33+
<Box
34+
p={6}
35+
borderWidth="1px"
36+
borderRadius="lg"
37+
w={{ base: "100%", md: "30%" }}
38+
>
39+
<VStack spacing={4} align="flex-start">
40+
<Heading size="md">Quick Start with FastAPI CLI</Heading>
41+
<Text>
42+
FastAPI CLI is your primary tool for managing your projects.
43+
Before you start, make sure you have FastAPI CLI installed on
44+
your machine. You can install it using pip:
45+
</Text>
46+
<Text>
47+
<Code>pip install fastapi-cli</Code>
48+
</Text>
49+
<Heading size="sm">Getting started:</Heading>
50+
<Text>
51+
1. Initialize your project: <Code>fastapi init</Code>
52+
</Text>
53+
<Text>
54+
2. Deploy your project: <Code>fastapi deploy</Code>
55+
</Text>
56+
<Text>
57+
You can learn more in the{" "}
58+
<Link color="ui.main">FastAPI CLI documentation.</Link>
59+
</Text>
60+
</VStack>
61+
</Box>
62+
</Flex>
63+
)}
1464
</Container>
1565
)
1666
}

0 commit comments

Comments
 (0)