Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions interview/dummy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
"use client";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file will be deleted, don't write code here

import React, {useState, useEffect} from "react";
import axios from "axios";

type Character = {
id: number;
name: string;
image: string;
};

export default function Home() {
const [characters, setCharacters] = useState<Character[]>([]);

useEffect(() => {
axios.get("https://rickandmortyapi.com/api/character")
.then((response) => {
setCharacters(response.data.results);
});
}, []);

return (
<main className="flex min-h-screen flex-col items-center justify-between p-24">
<h1 className="text-4xl font-bold text-center">Rick and Morty</h1>
<div className="flex flex-wrap items-center justify-center gap-24 p-24">
{characters.map((character) => (
<div key={character.id} className="flex flex-col items-center">
<img
src={character.image}
alt={character.name}
width={350}
height={350}

/>
<h2 className="text-3xl font-bold mt-10">{character.name}</h2>

</div>
))}
</div>
</main>
);
}
3 changes: 3 additions & 0 deletions oa/image-feed/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
36 changes: 36 additions & 0 deletions oa/image-feed/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
20 changes: 20 additions & 0 deletions oa/image-feed/.next/app-build-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"pages": {
"/page": [
"static/chunks/webpack.js",
"static/chunks/main-app.js",
"static/chunks/app/page.js"
],
"/layout": [
"static/chunks/webpack.js",
"static/chunks/main-app.js",
"static/css/app/layout.css",
"static/chunks/app/layout.js"
],
"/_not-found/page": [
"static/chunks/webpack.js",
"static/chunks/main-app.js",
"static/chunks/app/_not-found/page.js"
]
}
}
30 changes: 30 additions & 0 deletions oa/image-feed/.next/build-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"polyfillFiles": [
"static/chunks/polyfills.js"
],
"devFiles": [
"static/chunks/react-refresh.js"
],
"ampDevFiles": [],
"lowPriorityFiles": [
"static/development/_buildManifest.js",
"static/development/_ssgManifest.js"
],
"rootMainFiles": [
"static/chunks/webpack.js",
"static/chunks/main-app.js"
],
"pages": {
"/_app": [
"static/chunks/webpack.js",
"static/chunks/main.js",
"static/chunks/pages/_app.js"
],
"/_error": [
"static/chunks/webpack.js",
"static/chunks/main.js",
"static/chunks/pages/_error.js"
]
},
"ampFirstPages": []
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
27 changes: 27 additions & 0 deletions oa/image-feed/.next/fallback-build-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"polyfillFiles": [
"static/chunks/polyfills.js"
],
"devFiles": [
"static/chunks/fallback/react-refresh.js"
],
"ampDevFiles": [
"static/chunks/fallback/webpack.js",
"static/chunks/fallback/amp.js"
],
"lowPriorityFiles": [],
"rootMainFiles": [],
"pages": {
"/_app": [
"static/chunks/fallback/webpack.js",
"static/chunks/fallback/main.js",
"static/chunks/fallback/pages/_app.js"
],
"/_error": [
"static/chunks/fallback/webpack.js",
"static/chunks/fallback/main.js",
"static/chunks/fallback/pages/_error.js"
]
},
"ampFirstPages": []
}
1 change: 1 addition & 0 deletions oa/image-feed/.next/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "commonjs"}
1 change: 1 addition & 0 deletions oa/image-feed/.next/react-loadable-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
76 changes: 76 additions & 0 deletions oa/image-feed/.next/server/_error.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions oa/image-feed/.next/server/app-paths-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"/_not-found/page": "app/_not-found/page.js",
"/page": "app/page.js"
}
Loading