Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Commit

Permalink
Fix: スケルトンローダーの修正(#19
Browse files Browse the repository at this point in the history
  • Loading branch information
fkunn1326 authored Nov 3, 2022
1 parent fcd2553 commit 61a46bb
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 7 deletions.
2 changes: 1 addition & 1 deletion components/header/dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default function Dropdawn(props) {
"block px-4 py-2 text-sm cursor-pointer"
)}
onClick={() => {
router.push("/kiyaku");
router.push("/tos");
}}
>
利用規約
Expand Down
2 changes: 1 addition & 1 deletion components/header/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const Sidebar = ({ isOpen, avatar, name, id }) => {
閲覧履歴
</a>
</Link>
<Link href="/kiyaku">
<Link href="/tos">
<a className="text-gray-600 font-semibold p-2">
利用規約
</a>
Expand Down
2 changes: 1 addition & 1 deletion pages/signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const Signup = () => {
required
></input>
<div className="ml-3 text-sm cursor-pointer">
<Link href="/kiyaku">
<Link href="/tos">
<a
href=""
className="text-sm font-medium text-sky-600 hover:underline"
Expand Down
4 changes: 2 additions & 2 deletions pages/kiyaku.tsx → pages/tos.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react"
import Header from "../components/header/header"

const kiyaku = () => {
const tos = () => {
return (
<div>
<Header />
Expand Down Expand Up @@ -157,4 +157,4 @@ const kiyaku = () => {
)
}

export default kiyaku
export default tos
16 changes: 15 additions & 1 deletion pages/users/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,23 @@ export default function App() {
}, 1000)
}

if (!data)
if (!data){
return (
<div>
<Header></Header>
<div className="relative w-screen h-64 sm:h-96 p-4 sm:p-8 pb-12">
<div className="w-full h-full">
<div className="w-full h-full mx-auto rounded-3xl animate-pulse bg-gray-200"></div>
</div>
<div className="flex flex-row items-end absolute bottom-[-15px] left-8 sm:left-36">
<div className="relative w-20 h-20 sm:w-24 sm:h-24 border-[3.5px] border-white bg-gray-200 rounded-full">
<div className="rounded-full animate-pulse"></div>
</div>
<div className="flex flex-col mb-3 ml-5 font-semibold text-lg">
<div className="ml-2 rounded-full bg-gray-200 h-5 w-32"></div>
</div>
</div>
</div>
<div className="mx-auto max-w-2xl py-16 px-4 sm:py-24 sm:px-6 lg:max-w-7xl lg:px-8">
<div className="grid grid-cols-2 gap-y-10 gap-x-6 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 xl:gap-x-8">
{Array.apply(0, Array(10)).map(function (x, i) {
Expand All @@ -167,6 +180,7 @@ export default function App() {
</div>
</div>
);
}

var images = data[0].images.slice(0, data[0].images.length);
return (
Expand Down
102 changes: 101 additions & 1 deletion public/sw.js

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

1 comment on commit 61a46bb

@vercel
Copy link

@vercel vercel bot commented on 61a46bb Nov 3, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.