Skip to content

Commit 921c893

Browse files
committed
small fixes to type errors and use of next/link
1 parent 990c375 commit 921c893

14 files changed

+78
-62
lines changed

components/Navbar.tsx

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import Logo from './Logo'
1010
import NavMenu from './NavMenu'
1111
import SearchButton from './SearchButton'
1212
import { Text } from './Text'
13+
import { StyledLink } from './StyledLink'
1314

1415
const GITHUB_URL = 'https://github.com/csesoc/learning-platform'
1516
const navItems = [
@@ -153,28 +154,21 @@ export default function Navbar() {
153154
</Flex>
154155
<NavContainer isOpen={isOpen}>
155156
{navItems.map((navItem, idx) => (
156-
<Link key={idx} href={`/${navItem.path}`}>
157+
<Link
158+
key={idx}
159+
href={`/${navItem.path}`}
160+
legacyBehavior
161+
passHref>
157162
<Text
158-
as="a"
163+
as={'a'}
159164
css={{ color: '$slate12', cursor: 'pointer', whiteSpace: 'nowrap' }}
160165
onClick={() => { setIsOpen(false); console.log('hi') }}>
161166
{navItem.title}
162-
163167
</Text>
164168
</Link>
165169

166170
)
167171
)}
168-
{/* <Text
169-
as="a"
170-
size="label-lg"
171-
css={{
172-
color: '$slate11',
173-
userSelect: 'none',
174-
cursor: 'not-allowed'
175-
}}>
176-
About
177-
</Text> */}
178172
</NavContainer>
179173
<Box css={{
180174
display: isOpen ? "block" : "none",

data/articles/ppc-backend-1.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,5 +172,4 @@ In our <Link href="/articles/ppc-backend-2">next article</Link> we will look at
172172
next="/articles/ppc-backend-2"
173173

174174
nextName="Backend Project Tutorial 2 - MongoDB"
175-
>
176-
</ArticleButtonContainer>
175+
/>

data/articles/ppc-backend-2.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,4 @@ nextName="Backend Project Tutorial 3 - CRUD Opearations"
134134

135135
prev="/articles/ppc-backend-1"
136136
prevName="Backend Project Tutorial 1 - Creating a simple Express.js backend"
137-
>
138-
</ArticleButtonContainer>
139-
137+
/>

data/articles/ppc-backend-3.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,4 @@ nextName="Backend Project Tutorial 4 - Users and authentication"
9797

9898
prev="/articles/ppc-backend-2"
9999
prevName="Backend Project Tutorial 2 - MongoDB"
100-
>
101-
</ArticleButtonContainer>
100+
/>

data/articles/ppc-backend-4.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,5 +384,4 @@ nextName="Backend Project Tutorial 5 - Deployment"
384384

385385
prev="/articles/ppc-backend-3"
386386
prevName="Backend Project Tutorial 3 - CRUD Operations"
387-
>
388-
</ArticleButtonContainer>
387+
/>

data/articles/ppc-backend-5.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,4 @@ That's about it for our backend tutorial. To recap, we have set up an Express ba
5353

5454
prev="/articles/ppc-backend-4"
5555
prevName="Backend Project Tutorial 4 - Users and authentication"
56-
>
57-
</ArticleButtonContainer>
56+
/>

data/articles/reactjs-tut-0.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
---
2-
title: "ReactJS Project Tutorial: Introduction"
2+
title: 'ReactJS Project Tutorial: Introduction'
33
date: 2022-06-28
44
desc: A series of tutorials to teach you the fundamentals of ReactJS and how to build a frontend project.
55
author: Gordon Huang
66
tags:
77
- 'ReactJS'
88
- 'Frontend'
99
coverPhoto: '/images/generic/shahadat-rahman-BfrQnKBulYQ-unsplash.jpg'
10-
1110
---
1211

1312
Welcome to this tutorial series on ReactJS! This tutorial aims to teach you the fundamentals of the ReactJS front-end library so you can learn how to build your own projects with ReactJS. By the end of this tutorial series you will have built a front-end application like this:
1413

1514
<Centerer>
16-
<img src="https://imgur.com/sfHTEm4.png" alt="Final product of this this tutorial series" width="70%" />
15+
<img
16+
src="https://imgur.com/sfHTEm4.png"
17+
alt="Final product of this this tutorial series"
18+
width="70%"
19+
/>
1720
</Centerer>
1821

1922
ReactJS is a front-end JavaScript library for building user interfaces for websites, dynamic web applications, mobile apps, and many other places that need a visual interface for users to interact with software. It was released in 2013 and since then it has become by far the most popular tool for building web applications. It is made and maintained by Facebook/Meta and is used for many commercial apps and websites like Facebook, Instagram, Airbnb and Uber Eats. Needless to say, ReactJS is currently widely used in industry and there are huge swathes of positions in the tech industry for ReactJS developers. So learning ReactJS will give you valuable front-end UI development skills, and also make you highly employable for many years before the next big front-end framework takes its place.
@@ -28,5 +31,4 @@ If you're ready, learn to build a mini React application starting in the <Link h
2831

2932
next="/articles/reactjs-tut-1"
3033
nextName="ReactJS Project Tutorial: Part 1"
31-
>
32-
</ArticleButtonContainer>
34+
/>

data/articles/reactjs-tut-1.mdx

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ $ node -v
4040
and press enter. This tests whether you have installed NodeJS correctly. If you have, it should print the version of NodeJS which you have installed, such as `16.15.0`.
4141

4242
## NPM - Node Package Manager
43+
4344
Installing NodeJS also automatically installs NPM (Node Package Manager) which manages JavaScript packages for your projects. To check that it has installed properly, type into your command line:
4445

4546
```bash:
@@ -82,30 +83,38 @@ $ cd reactjs-project-tutorial
8283
Also open up the project in VSCode by opening up VSCode and opening the folder <FileName>reactjs-project-tutorial</FileName>.
8384

8485
<Centerer>
85-
<img alt="Open VSCode and open a folder" src="https://imgur.com/T6kP1ov.png" width="80%" />
86+
<img
87+
alt="Open VSCode and open a folder"
88+
src="https://imgur.com/T6kP1ov.png"
89+
width="80%"
90+
/>
8691
</Centerer>
8792

8893
<Centerer>
89-
<img alt="Select the my-react-app folder" src="https://imgur.com/vts088y.png" width="80%" />
94+
<img
95+
alt="Select the my-react-app folder"
96+
src="https://imgur.com/vts088y.png"
97+
width="80%"
98+
/>
9099
</Centerer>
91100

92101
You should now be able to see the source code of your new React app in your code editor!
93102

94103
<Centerer>
95-
<img alt="Your React source code app in VSCode" src="https://i.imgur.com/0uACQX4.png" width="80%" />
104+
<img
105+
alt="Your React source code app in VSCode"
106+
src="https://i.imgur.com/0uACQX4.png"
107+
width="80%"
108+
/>
96109
</Centerer>
97110

98111
In the <Link href="/articles/reactjs-tut-2">next tutorial</Link> we'll explore all the different parts of the code that create-react-app has given to us.
99112

100-
101113
<ArticleButtonContainer
102114

103115
next="/articles/reactjs-tut-2"
104116
prev="/articles/reactjs-tut-0"
105117

106118
nextName="ReactJS Project Tutorial: Part 2"
107119
prevName="ReactJS Project Tutorial: Introduction"
108-
>
109-
</ArticleButtonContainer>
110-
111-
120+
/>

data/articles/reactjs-tut-2.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ In the last tutorial you installed all the tools we'll need to create a React ap
2222
install it.
2323
</Callout>
2424

25-
2625
The <FileName>README.md</FileName> file at the bottom has a brief description of this repository and how to use it. The <FileName>.md</FileName> extension stands for _markdown_, a common text editing syntax to format text. It is not code; markdown is to make text readable for humans.
2726

2827
In general you should use a <FileName>README.md</FileName> in a project to give an overview of what your project does, how to use it, and any other information you think would be useful for people interested in your code.
@@ -85,5 +84,4 @@ prev="/articles/reactjs-tut-1"
8584

8685
nextName="ReactJS Project Tutorial: Part 3"
8786
prevName="ReactJS Project Tutorial: Part 1"
88-
>
89-
</ArticleButtonContainer>
87+
/>

data/articles/reactjs-tut-3.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,5 +124,4 @@ prev="/articles/reactjs-tut-2"
124124

125125
nextName="ReactJS Project Tutorial: Part 4"
126126
prevName="ReactJS Project Tutorial: Part 2"
127-
>
128-
</ArticleButtonContainer>
127+
/>

0 commit comments

Comments
 (0)