Skip to content

Commit

Permalink
Merge pull request #537 from DhairyaMajmudar/tailwind/error
Browse files Browse the repository at this point in the history
Feat: Styles of `Error.tsx` shifted in tailwindcss
  • Loading branch information
frouioui authored Apr 30, 2024
2 parents 299b7e7 + 9e6fa0f commit 85cc5af
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 120 deletions.
16 changes: 16 additions & 0 deletions website/src/assets/styles/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,19 @@ limitations under the License.
@apply after:content-[counter(num)];
}
}

.errorImgAnimation {
animation: translateUpDown 2s infinite alternate;
}

@keyframes translateUpDown {

0%,
100% {
transform: translateY(0);
}

50% {
transform: translateY(-0.7cm);
}
}
2 changes: 1 addition & 1 deletion website/src/pages/PublicRoute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
import React from "react";
import { Routes, Route } from "react-router-dom";

import Error from "../utils/Error/Error";
import Error from "../utils/Error";
import Layout from "../pages/Layout";
import MacroPage from "./MacroPage/MacroPage";
import ComparePage from "./ComparePage/ComparePage";
Expand Down
47 changes: 47 additions & 0 deletions website/src/utils/Error.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
Copyright 2024 The Vitess Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

import React from "react";
import { Link } from "react-router-dom";
import ErrorImage from "../assets/error.png";
import { Button } from "@/components/ui/button";

const Error = () => {
return (
<div className="error flex flex-col justify-center items-center mt-12">
<div className="m-4 flex flex-col items-center">
<h1 className="text-[3rem] font-bold">404</h1>
</div>
<div className="pl-[30px] m-4 flex flex-col items-center">
<img
src={ErrorImage}
alt="error"
className="p-[10px] w-[260px] h-[225px] errorImgAnimation"
/>
</div>
<div className="m-4 flex flex-col items-center">
<h2 className="font-medium text-center ">OOPS! Something went wrong</h2>
<Link to="/home">
<Button className="px-[22px] py-2.5 m-[20px] text-[1rem] rounded-[1rem] bg-[#e77002] text-white border-none cursor-pointer flex flex-row items-center gap-[10px]">
Go Back
</Button>
</Link>
</div>
</div>
);
};

export default Error;
41 changes: 0 additions & 41 deletions website/src/utils/Error/Error.tsx

This file was deleted.

78 changes: 0 additions & 78 deletions website/src/utils/Error/error.css

This file was deleted.

0 comments on commit 85cc5af

Please sign in to comment.