This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('config.php'); | |
include_once 'verify_utils.php'; | |
$shopify = $_GET; | |
$shop_url = $shopify['shop']; | |
$shop_name = get_shop_name($shop_url, '', '.myshopify.com'); | |
//check if app is already install or not |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import styled from "@emotion/styled"; | |
import { NavLink } from "react-router-dom"; | |
import { Helmet } from "react-helmet-async"; | |
import { | |
CardContent, | |
Accordion, | |
AccordionDetails, | |
AccordionSummary, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { HttpContextContract } from "@ioc:Adonis/Core/HttpContext"; | |
import { chatTypes } from "App/Enums/ChatTypeEunm"; | |
import ChathistorySourceLog from "App/Models/ChathistorySourceLog"; | |
import { | |
chatDetails, | |
createChat, | |
deleteChat, | |
deleteUserChats, | |
getChatHistory, | |
populateChatRequestId, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useEffect, useRef } from 'react'; | |
// Let's pretend this <Counter> component is expensive to re-render so ... | |
// ... we wrap with React.memo, but we're still seeing performance issues :/ | |
// So we add useWhyDidYouUpdate and check our console to see what's going on. | |
const Counter = React.memo(props => { | |
useWhyDidYouUpdate('Counter', props); | |
return <div style={props.style}>{props.count}</div>; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function flatter(data) { | |
var result = []; | |
for (var i = 0; i < data.length; i++) { | |
if(Array.isArray(data[i])) { | |
result = result.concat(flatten(data[i])); | |
} else { | |
result.push(data[i]); | |
} | |
} | |
return result; |