Skip to content

Commit

Permalink
Update Components; Add OpenAI api for testing api endpoints in produc…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
Shivam Naik committed Apr 13, 2024
1 parent 37298c3 commit ed1023c
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 52 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

#environment file
.env

# dependencies
/node_modules
/.pnp
Expand Down
3 changes: 1 addition & 2 deletions components/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ const Page = ({children}) => {
const navbar_list = [
["Academics","/academics"],
["Work", "/work"],
["About", "/about"],
["Resume", "/resume"]
["Projects", "/projects"],
];

return(
Expand Down
5 changes: 0 additions & 5 deletions pages/api/hello.js

This file was deleted.

7 changes: 7 additions & 0 deletions pages/api/openai.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction

const getOpenAIKey = async(req, res) => {
res.status(200).json({ api_key: process.env.OPENAI_API_KEY})
}

export default getOpenAIKey;
42 changes: 0 additions & 42 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,4 @@ export default function Home() {
<p style={{fontSize: "2rem"}}>A master student at TU Kaiserslautern.</p>
</Page>
);

{/* <main className={styles.main}>
<p className={styles.title}>
Welcome to <a href="https://nextjs.org">Next.js</a> on Docker!
</p>
<p className={styles.description}>
Get started by editing{' '}
<code className={styles.code}>pages/index.js</code>
</p>
<div className={styles.grid}>
<a href="https://nextjs.org/docs" className={styles.card}>
<h3>Documentation &rarr;</h3>
<p>Find in-depth information about Next.js features and API.</p>
</a>
<a href="https://nextjs.org/learn" className={styles.card}>
<h3>Learn &rarr;</h3>
<p>Learn about Next.js in an interactive course with quizzes!</p>
</a>
<a
href="https://github.com/vercel/next.js/tree/canary/examples"
className={styles.card}
>
<h3>Examples &rarr;</h3>
<p>Discover and deploy boilerplate example Next.js projects.</p>
</a>
<a
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
className={styles.card}
>
<h3>Deploy &rarr;</h3>
<p>
Instantly deploy your Next.js site to a public URL with Vercel.
</p>
</a>
</div>
</main>
*/}
};
12 changes: 12 additions & 0 deletions pages/projects.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Page from "../components/Page";

const Projects = () => {

return(
<Page>
<h1>Projects</h1>
</Page>
);
}

export default Projects;
5 changes: 2 additions & 3 deletions pages/work.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import Page from "../components/Page";

const Academics = () => {
const WorkExperience = () => {

return(
<Page>
<h1>Work Experience</h1>
</Page>
);
}

export default Academics;
export default WorkExperience;

0 comments on commit ed1023c

Please sign in to comment.