Skip to content

Commit 7da4881

Browse files
committed
Update to latest Topo
1 parent 3bcdb31 commit 7da4881

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1741
-632
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"dependencies": {
1111
"@chakra-ui/core": "^0.8.0",
12-
"@codeday/topo": "^3.38.0",
12+
"@codeday/topo": "^7.0.12",
1313
"@codeday/topocons": "^1.3.0",
1414
"@emotion/core": "^10.0.28",
1515
"@emotion/styled": "^10.0.27",

src/components/CheckApplicationsOpen.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { DateTime } from 'luxon';
2-
import Box from '@codeday/topo/Atom/Box';
3-
import Text from '@codeday/topo/Atom/Text';
2+
import { Box, Text } from '@codeday/topo/Atom';
43
import { useProgramDates } from '../providers';
54

65
export default function CheckApplicationsOpen({ children, ...props }) {

src/components/CheckLoggedIn.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import { signIn, useSession } from 'next-auth/client'
2-
import Box from '@codeday/topo/Atom/Box';
3-
import Button from '@codeday/topo/Atom/Button';
4-
import Spinner from '@codeday/topo/Atom/Spinner';
5-
import Text from '@codeday/topo/Atom/Text';
2+
import { Box, Button, Spinner, Text } from '@codeday/topo/Atom';
63

74
export default function CheckLoggedIn({ children, ...props }) {
85
const [ session, loading ] = useSession();
@@ -16,7 +13,7 @@ export default function CheckLoggedIn({ children, ...props }) {
1613

1714
if (!session) return (
1815
<Box textAlign="center" maxWidth="md" margin="0 auto" {...props}>
19-
<Button onClick={() => signIn('auth0')} variantColor="green" mb={2}>Sign In</Button>
16+
<Button onClick={() => signIn('auth0')} colorScheme="green" mb={2}>Sign In</Button>
2017
<Text>
2118
You'll need to create or log into a CodeDay account to continue. You'll use this to access your Labs dashboard
2219
if your application is accepted.

src/components/Comparison.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import nl2br from 'react-nl2br';
2-
import Box, { Grid } from '@codeday/topo/Atom/Box';
3-
import Text, { Heading } from '@codeday/topo/Atom/Text';
4-
import List, { Item } from '@codeday/topo/Atom/List';
2+
import { Box, Grid, Text, Heading, List, ListItem as Item } from '@codeday/topo/Atom';
53

64
export default function Comparison({ leftTop, rightTop, leftBottom, rightBottom, factors, ...props }) {
75
const rotatedFactors = factors.reduce((accum, factor) => ({

src/components/Dashboard/Match.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import Text, { Heading, Link } from '@codeday/topo/Atom/Text';
2-
import Box, { Grid } from '@codeday/topo/Atom/Box';
3-
import Button from '@codeday/topo/Atom/Button';
4-
import List, { Item } from '@codeday/topo/Atom/List';
1+
import { Text, Heading, Link, Box, Button, List, ListItem as Item } from '@codeday/topo/Atom';
52
import truncate from 'truncate';
63
import { TagList } from './Tag'
74
import ordinal from '../../ordinal';
@@ -35,7 +32,15 @@ export function Match ({ match, selectedTags, onSelect, onDeselect, isSelected,
3532
const selectedTagIds = selectedTags.map((t) => t.id);
3633
return (
3734
<Box mb={8} borderColor="gray.200" borderWidth={2} borderRadius={2}>
38-
<Heading p={4} as="h3" fontSize="xl" mb={2} backgroundColor="gray.100" borderBottomColor="gray.200" borderBottomWidth={2} mb={4}>
35+
<Heading
36+
p={4}
37+
as="h3"
38+
fontSize="xl"
39+
backgroundColor="gray.100"
40+
borderBottomColor="gray.200"
41+
borderBottomWidth={2}
42+
mb={4}
43+
>
3944
{match.mentors.map(MentorHeading).join(' / ')}
4045
{match.mentors.filter((m) => m.profile?.timezone).length > 0 && (
4146
<Text mb={0} fontSize="md" bold>Timezone: {match.mentors.map((m) => m.profile?.timezone).join(', ')}</Text>
@@ -93,7 +98,7 @@ export function Match ({ match, selectedTags, onSelect, onDeselect, isSelected,
9398
<Box mb={8} mr={4} ml={4}>
9499
<Button
95100
onClick={() => isSelected ? onDeselect(match) : onSelect(match)}
96-
variantColor={isSelected ? 'red' : 'green'}
101+
colorScheme={isSelected ? 'red' : 'green'}
97102
variant={isSelected ? 'outline' : 'solid'}
98103
>
99104
{isSelected ? 'Undo Selection' : 'Add to My Ranking'}

src/components/Dashboard/MentorManagerDetails.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import Box, { Grid } from '@codeday/topo/Atom/Box';
2-
import Text, { Link, Heading } from '@codeday/topo/Atom/Text';
3-
import Image from '@codeday/topo/Atom/Image';
1+
import { Box, Grid, Text, Link, Heading, Image } from '@codeday/topo/Atom';
42

53
export default function MentorManagerDetails({ mentor }) {
64
return (

src/components/Dashboard/MentorProfile.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import { useState, useReducer, useEffect } from 'react';
22
import { print } from 'graphql';
33
import { useSession } from 'next-auth/client'
4-
import Box, { Grid } from '@codeday/topo/Atom/Box';
5-
import Button from '@codeday/topo/Atom/Button';
6-
import { default as Input } from '@codeday/topo/Atom/Input/Text';
7-
import { default as Textarea } from '@codeday/topo/Atom/Input/Textarea';
84
import {
5+
Box,
6+
Grid,
7+
Button,
8+
TextInput as Input,
9+
Textarea,
910
NumberInput,
1011
NumberInputField,
11-
NumberInputStepper,
1212
NumberIncrementStepper,
1313
NumberDecrementStepper,
14-
} from "@chakra-ui/core"
14+
Heading,
15+
} from '@codeday/topo/Atom';
1516
import { useToasts } from '@codeday/topo/utils';
1617
import { useFetcher } from '../../dashboardFetch';
17-
import { Heading } from '@codeday/topo/Atom/Text';
1818
import SelectMentorStatus from './SelectMentorStatus';
1919
import { EditMentor } from './MentorProfile.gql';
2020

@@ -212,7 +212,7 @@ export default function MentorProfile({ mentor: originalMentor, ...rest }) {
212212

213213
<Button
214214
mt={8}
215-
variantColor="green"
215+
colorScheme="green"
216216
isLoading={loading}
217217
disabled={loading || !profileTextValid}
218218
onClick={async () => {

src/components/Dashboard/MentorStats.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import Box, { Grid } from '@codeday/topo/Atom/Box';
2-
import Text, { Heading } from '@codeday/topo/Atom/Text';
3-
import List, { Item } from '@codeday/topo/Atom/List';
1+
import { Box, Grid, Text, Heading, List, ListItem as Item } from '@codeday/topo/Atom';
42

53
export default function MentorStats({ mentors, ...props }) {
64
const toProjects = (m) => m.reduce((accum, { projects }) => [...accum, ...projects], []);

src/components/Dashboard/ProjectEditor.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
11
import { useReducer, useState } from 'react';
22
import { print } from 'graphql';
3-
import Box, { Grid } from '@codeday/topo/Atom/Box';
4-
import Button from '@codeday/topo/Atom/Button';
5-
import { default as Textarea } from '@codeday/topo/Atom/Input/Textarea';
63
import {
4+
Box,
5+
Grid,
6+
Button,
7+
Textarea,
8+
Text,
9+
Heading,
10+
Link,
11+
List,
12+
ListItem as Item,
713
NumberInput,
814
NumberInputField,
915
NumberInputStepper,
1016
NumberIncrementStepper,
1117
NumberDecrementStepper,
12-
} from "@chakra-ui/core"
13-
import Text, { Heading, Link } from '@codeday/topo/Atom/Text';
18+
} from "@codeday/topo"
1419
import { useToasts } from '@codeday/topo/utils';
1520
import { useFetcher } from '../../dashboardFetch';
1621
import SelectTrack from './SelectTrack';
1722
import SelectProjectStatus from './SelectProjectStatus';
1823
import { EditProject, EditProjectLimited } from './ProjectEditor.gql';
1924
import TagPicker from './TagPicker';
20-
import { default as Checkbox } from '@codeday/topo/Atom/Input/Checkbox';
21-
import List, { Item } from '@codeday/topo/Atom/List';
2225

2326
export default function ProjectEditor({ tags, project: originalProject, limited, ...rest }) {
2427
const [project, setProject] = useReducer(
@@ -157,7 +160,7 @@ export default function ProjectEditor({ tags, project: originalProject, limited,
157160
<Box d="inline-block" ml={4} pl={4} borderLeftWidth={1}>
158161
<Button
159162
d="inline-block"
160-
variantColor="green"
163+
colorScheme="green"
161164
onClick={save({ status: 'PROPOSED' })}
162165
isLoading={loading}
163166
disabled={loading}

src/components/Dashboard/SelectMentorStatus.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Select } from '@codeday/topo/Atom/Input/Select';
2-
import Box from '@codeday/topo/Atom/Box';
1+
import { Select, Box } from '@codeday/topo/Atom';
32

43
const options = {
54
APPLIED: 'Applied',

0 commit comments

Comments
 (0)