Skip to content

Commit

Permalink
fix:api,scrollbar
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjaybaskaran01 committed Sep 9, 2021
1 parent 05ed0ff commit 96ad2af
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/api/Api.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import axios from "axios";


export const API = axios.create({
baseURL: "http://localhost:3001", //PROCESS.ENV_REACT_APP_BASE_URL
baseURL: "https://evie-api.csivit.com", //PROCESS.ENV_REACT_APP_BASE_URL
responseType: "json",
})

export const BASEURL = "http://localhost:3001"
export const BASEURL = "https://evie-api.csivit.com"

export default API
13 changes: 10 additions & 3 deletions src/components/EventProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,24 @@ import { FiUsers } from "react-icons/fi";
import { VscGlobe } from "react-icons/vsc";

const EventProfile = ({img,org,title,desc,start,end,url,backgroundColor,textColor,todayChecker}) => {
const mediaMatch = window.matchMedia('(min-width: 640px)');
console.log(mediaMatch.matches);
start = new Date(start);
end = new Date(end);
let myRegexp=new RegExp("^(?:https?://)?(?:[^@]+@)?(?:www.)?([^:/?]+)")

const style={
backgroundColor:backgroundColor,
borderRadius:"8px",
display:"flex",
height:todayChecker?(mediaMatch.matches?"14rem":"100%"):"100%",
}
let urlReg = myRegexp.exec(url);
return (
<div className="w-full">
<div className="flex flex-col">
<div
className="border border-gray-900 align-center text-left p-2 mr-2 mb-2 mt-2 w-full h-full sm:h-56 flex-col sm:flex-row"
style={{ backgroundColor,borderRadius:"8px",display:"flex",}}
className="border border-gray-900 align-center text-left p-2 mr-2 mb-2 mt-2 w-full flex-col sm:flex-row"
style={style}
>
<div className="h-80 w-80 self-center sm:w-48 sm:h-48 my-2 flex items-center justify-center imgdiv">
<img src={img}
Expand Down

0 comments on commit 96ad2af

Please sign in to comment.