@ant-design/icons#PlusCircleTwoTone TypeScript Examples

The following examples show how to use @ant-design/icons#PlusCircleTwoTone. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.tsx    From RareCamp with Apache License 2.0 5 votes vote down vote up
Home = () => {
  const router = useRouter()
  const { data, isLoading } = useQuery<any>(
    'defaultWorkspace',
    () => axios.get('/workspaces/default'),
    { retry: false },
  )
  if (!isLoading && !data?.data?.workspace?.programs?.length)
    router.push('/workspace/intro')
  useEffect(() => {}, [data])

  return (
    <AppLayout
      title={<PageTitle title="Programs" />}
      selectedKey="programs"
    >
      <UserHeader
        getContent={(userInfo) => ({
          title: `Hello ${userInfo.name}, welcome back!`,
          description: `Here's info about your programs`,
        })}
      />
      {isLoading || !data?.data?.workspace?.programs?.length ? (
        <Skeleton />
      ) : (
        <ProgramCards>
          {data?.data?.workspace?.programs.map((program) => (
            <Card
              key={program.programId}
              bordered
              style={{ width: 284 }}
            >
              <Space
                style={{
                  justifyContent: 'space-between',
                  width: '100%',
                }}
              >
                <Link
                  href={`/programs/${program.workspaceId}/${program.programId}`}
                >
                  <a>
                    <Title level={4}>{program.name}</Title>
                  </a>
                </Link>
                <EditProgram program={program} />
              </Space>
              <p>{program.description}</p>
            </Card>
          ))}
          <Card bordered style={{ width: 284 }}>
            <Link href="/workspace/intro">
              <a>
                <div className="add-program">
                  <PlusCircleTwoTone style={{ fontSize: 33 }} />
                  <div>Add program</div>
                </div>
              </a>
            </Link>
          </Card>
        </ProgramCards>
      )}
    </AppLayout>
  )
}