Skip to content

Instantly share code, notes, and snippets.

View Abusayid693's full-sized avatar
💻
Learning

Rehan Choudhury Abusayid693

💻
Learning
View GitHub Profile
@Abusayid693
Abusayid693 / Analytics.jsx
Created February 11, 2022 16:05
Analytics main container
import { useState } from "react";
import {createUseStyles} from "react-jss"
import "antd/dist/antd.css";
// Sub Components
import MyGraph from "./component/graph";
import DropdownSelector from "./component/menu";
import dataSet from "./component/data";
@Abusayid693
Abusayid693 / data.js
Last active February 11, 2022 20:31
Demo data for analytics
const data_1 = [
{
view: 1000,
name: "Jan",
},
{
view: 1200,
name: "Fab",
},
{
@Abusayid693
Abusayid693 / items.jsx
Created February 11, 2022 15:57
item list for dropdown
import { Menu } from "antd";
export const menu = (
handleDataFetching,
dropdownCategories,
selectedItem
) => {
return (
<Menu>
{dropdownCategories.map((item) => {
@Abusayid693
Abusayid693 / menu.jsx
Last active February 11, 2022 20:31
Drop-down selector for Analytics
import React, { useState } from "react";
import { Dropdown, Button } from "antd";
import { DownOutlined } from "@ant-design/icons";
import { createUseStyles } from "react-jss";
import { menu } from "./items";
/**
* Add your all dropdown categories here with unique key
*/
@Abusayid693
Abusayid693 / graph.jsx
Last active February 11, 2022 20:31
Graph container
import React from "react";
import { createUseStyles } from "react-jss";
import {
AreaChart,
Area,
Tooltip,
ResponsiveContainer,
CartesianGrid,
XAxis,
YAxis,
@Abusayid693
Abusayid693 / 📊 Weekly development breakdown
Last active September 3, 2023 04:34
Weekly development breakdown
TypeScript 7 hrs 1 min ██████████▎░░░░░░░░░░ 49.3%
JavaScript 4 hrs 37 mins ██████▊░░░░░░░░░░░░░░ 32.4%
Other 1 hr 16 mins █▊░░░░░░░░░░░░░░░░░░░ 8.9%
JSON 38 mins ▉░░░░░░░░░░░░░░░░░░░░ 4.5%
Bash 19 mins ▍░░░░░░░░░░░░░░░░░░░░ 2.2%