Skip to content

Commit 4511b00

Browse files
committed
misc
1 parent 8359b76 commit 4511b00

File tree

15 files changed

+116
-91
lines changed

15 files changed

+116
-91
lines changed

cache/cache.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/ImageInfoLayout.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { media } from "../utils";
99
import { baseTheme } from "../theme";
1010

1111
/**
12-
*
1312
* Student Resource Component
1413
* @prop {string} titleText - resource title
1514
* @prop {string} descriptionText - resource description

pages/_app.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ function MyApp({ Component, pageProps }) {
2424
<Head>
2525
<meta httpEquiv="Content-Type" content="text/html; charset=utf-8" />
2626
<meta name="viewport" content="width=device-width, initial-scale=1" />
27+
2728
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
2829
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
2930
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
3031
<link rel="manifest" href="/site.webmanifest" />
3132
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#fec63d" />
33+
3234
<meta name="msapplication-TileColor" content="#0d1d3f" />
3335
<meta name="theme-color" content="#0d1d3f" />
3436
<meta property="og:type" content="website" />
@@ -40,6 +42,7 @@ function MyApp({ Component, pageProps }) {
4042
/>
4143
<meta property="og:image" content="https://pumprofessionals.org/meta.png" />
4244
</Head>
45+
4346
<ThemeProvider theme={baseTheme}>
4447
<Component {...pageProps} />
4548
<GlobalStyle />

pages/about.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ export default function About() {
195195
<title>PuMP | About Us</title>
196196
<meta name="description" content="Get to know the PuMP family" />
197197
</Head>
198+
198199
<PageLayout>
199200
<Title
200201
title="About Us"

pages/api/blog.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { posts } from "../../cache/cache";
88
- tags = tags to filter
99
*/
1010
export default async (req, res) => {
11+
// console.log("tt", req.query);
1112
let results;
1213
try {
1314
results = await prisma.post.findMany();
@@ -20,18 +21,18 @@ export default async (req, res) => {
2021
post.title.toLowerCase().includes(req.query.search.toLowerCase())
2122
);
2223
}
24+
25+
const selectedTags = req.query.tags.split(",");
26+
if (selectedTags.length) {
27+
results = results.filter((post) =>
28+
post.tags.some((tag) => selectedTags.includes(tag))
29+
);
30+
}
31+
2332
let allResults = [];
2433
let filteredResults;
25-
if (req.query.tags) {
26-
for (let tag of req.query.tags.split(",")) {
27-
filteredResults = results.filter((post) => post.tags.includes(tag));
28-
allResults.push(...filteredResults);
29-
}
30-
results = allResults;
31-
}
32-
allResults = [];
3334
if (req.query.release) {
34-
for (let release of req.query.release.split(",")) {
35+
for (const release of req.query.release.split(",")) {
3536
filteredResults = results.filter((post) => post.releaseBatch === release);
3637
allResults.push(...filteredResults);
3738
}

pages/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export default function Home() {
4545
</Notification> */}
4646
<PageLayout>
4747
<TopSection />
48+
4849
<WhatsHappening />
4950
<Video
5051
embedId="f5jsJWl5WS0"

pages/resources.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export default function Resources({ ...props }) {
1313
content="Learn more about our resources including University Admissions Server, blog, and opportunities"
1414
/>
1515
</Head>
16+
1617
<PageLayout>
1718
<Title title="Student Resources" />
1819
<ResourcesSection />

pages/resources/blog.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,15 @@ export default function Blog({ blogs, ...props }) {
2929
const [releaseBatch, setReleaseBatch] = useState("");
3030
const [blogPosts, setBlogPosts] = useState([]);
3131
const [isLoading, setIsLoading] = useState(true);
32+
3233
useEffect(() => {
34+
// console.log(blogs);
3335
setBlogPosts(blogs);
3436
setIsLoading(false);
3537
}, []);
3638

3739
const handleChange = (searchValue, tagValues, releaseValues) => {
40+
// console.log([searchValue, tagValues, releaseValues]);
3841
setIsLoading(true);
3942
axios
4043
.get(
@@ -63,6 +66,7 @@ export default function Blog({ blogs, ...props }) {
6366
content="Read advice about interview dos and don'ts, medical school tips, careers in health sciences, and much more. All under one roof!"
6467
/>
6568
</Head>
69+
6670
<PageLayout>
6771
<ToastContainer />
6872
<div {...props}>
@@ -76,6 +80,7 @@ export default function Blog({ blogs, ...props }) {
7680
medical school tips, time management skills, careers in
7781
health sciences, and much more. All under one roof!"
7882
/>
83+
7984
<InputsWrapper>
8085
<SInput
8186
placeholder="Search by Title"
@@ -85,6 +90,7 @@ export default function Blog({ blogs, ...props }) {
8590
onChange={handleSearch}
8691
/>
8792
</InputsWrapper>
93+
8894
<BottomWrapper>
8995
<FilterWrapper>
9096
<FilterTitle size={baseTheme.size.h2} bold="true">

pages/resources/blog/[slug].jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ const BlogsPage = ({ source, frontMatter }) => {
3737
</div>
3838
);
3939
};
40-
4140
export default BlogsPage;
4241

4342
export const getStaticProps = async ({ params }) => {

pages/scholarship.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default function Resources({ ...props }) {
1515
<iframe
1616
id="JotFormIFrame-221947443957064"
1717
title="PuMP Foundation Scholarship"
18-
onLoad="window.parent.scrollTo(0,0)"
18+
onLoad={() => window.parent.scrollTo(0, 0)}
1919
allowTransparency="true"
2020
allowFullScreen="true"
2121
allow="geolocation; microphone; camera"

0 commit comments

Comments
 (0)